Skip Navigation

[Resolved] I want to use custom fields in page title

This support ticket is created 5 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 3 voices.

Last updated by NicolasM8008 5 years, 8 months ago.

Assisted by: Christian Cox.

Author
Posts
#1245414

I have post type "university" with custom fields "Original-Title" and I want to show it on frontend HTML for seo reason in <title> and description meta.
Is it possible to change title and description meta by some hook/filter and use there check for post type and combine some post metas like post-title and custom fields "original-title"

E.g.
Post title: "London Universität"
"original-title": "London University"
so, I want to show title like this:
"London Universität - London University - university information"
and description metatag as "Some information about London Universität (London University)"

#1245466

Hi, Toolset doesn't offer any APIs to help you manipulate page title and other SEO information directly, but you might be able to use a 3rd-party plugin like Yoast to do this. Their plugin offers an API that can be used to create custom placeholders, which you can program to display custom field information in the post metadata. Here's the documentation for that API:
http://hookr.io/actions/wpseo_register_extra_replacements

Here's another ticket that discusses how to create custom placeholders for the contents of a View:
https://toolset.com/forums/topic/meta-descriptions-excerpts-from-views-content/

In your case, you could use the Types Field shortcode API to display information from a custom field or fields.
https://toolset.com/documentation/customizing-sites-using-php/functions/
Click "+More info" beneath any field type to display code examples.

#1907711

Hi Christian,

Thanks for your response on this. I would like to hire a 3rd party developer to perform this task for me (editing a title using Yoast API & the Types Field shortcode API to display information from a field in the title). Would you be available or would you be able to recommend the type of developer that is best suited for this task?

Thank you

Nicolas

New threads created by Christian Cox and linked to this one are listed below:

https://toolset.com/forums/topic/i-want-to-use-custom-fields-in-page-title-and-hire-an-independent-contractor/