A
A
Anastasia2018-03-26 16:24:56
WordPress
Anastasia, 2018-03-26 16:24:56

How to display Yoast SEO meta data on a template page?

How to display Yoast SEO plugin meta data on template page?
For example, print the value of the breadcrumb title.
5ab8f47ce22ae200710948.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Orkhan Hasanli, 2018-03-26
@haanastasia

Hello!
It all depends on what kind of metadata you want to output.
If we are talking about "breadcrumbs", then first you need to include them in yoast seo
https://screenshots.firefox.com/ZK01uFlgIeGeY2yq/d...
And to display breadcrumbs in the template, use:

<ul class="breadcrumb">
      <?php if ( function_exists('yoast_breadcrumb') ) { yoast_breadcrumb('<p id="breadcrumbs">','</p>');} ?>
        </ul>

If we are talking about other meta fields... Description Title, etc., then each of these meta fields has its own name
_yoast_wpseo_metadesc e.g.
It remains to display them according to the post id

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question