Skip Navigation

[Resolved] Output Yoast SEO Titles inside content templates and loops

This thread is resolved. Here is a description of the problem and solution.

Problem:
How to output Yoast SEO meta titles on the page?

Solution:
Yoast stores the meta titles as hidden custom fields, e.g. _yoast_wpseo_title, possibly _yoast_wpseo_opengraph-title, which can be output using the wpv-post-field shortcode like so:

[wpv-post-field name="_yoast_wpseo_title"]
This support ticket is created 6 years, 2 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 2 replies, has 2 voices.

Last updated by Thomas AMX 6 years, 2 months ago.

Assisted by: Nigel.

Author
Posts
#1104906

Hi Guys,

Is it possible to output the SEO title entered into Yoast inside Toolset Content Templates or Loops?
I have spent hours trying to find a way to do it, but wasn't able to find a solution.

The Yoast SEO title can be completely different from the WP post title.

In Fields and Views, there is a shortcode "Post field" and it requires the exact name of the custom field.
I am not even sure Yoast SEO Title is a custom field, perhaps not, but it is some kind of metadata that must be stored with the post.

So, my reasoning is that there should be some way to access this post metadata and output it in Toolset....
right? Like I can output, for example, the ALT tag of an image in a CT or a loop....

Best regards,
Tom

#1105318

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screen Shot 2018-09-11 at 07.45.24.png

Hi Tom

I added a custom facebook title to a post with Yoast and checked the wp_postmeta table in the database and found it had been stored as a hidden custom field (the key begins with an underscore) with the key _yoast_wpseo_opengraph-title, so you should be able to output that with the wpv-post-field shortcode.

#1105340

Hello Nigel,

Thank you very much for your quick response.
_yoast_wpseo_opengraph-title wasn't the solution in my case, but it helped me discover "_yoast_wpseo_title".

So, in case somebody finds this thread later: [wpv-post-field name="_yoast_wpseo_title"] renders the SEO title from Yoast.

Brilliant, thanks again. Have a great day.
Cheers,
Tom