I have created a theme template for a custom taxonomy. The HTML title tag has the yoast title that I set when editing the taxonomy. I want to also make this the title of the page. I cant seem to access the title meta value in order to do this. Where is it stored?

$yoast_title = get_term_meta($current_term_obj->term_id, '_yoast_wpseo_title', true);

The code above returns nothing. I checked the meta table in the DB and there is nothing in there either.

  • The title of the page would just be the name of the taxonomy term, so if you want the title tag and the page heading to be the same thing, why not just give it the name you want? – Jacob Peattie Jun 28 '19 at 3:35
  • @JacobPeattie because its an SEO friendly title. when you tag posts in the wordpress UI it is not user friendly and nor is it when you see "post tags" at the bottom of the post where they are large. e.g. tag name= "stephen king books" seo title="Latest stephen king books - best horror stories" – user1889580 Jun 28 '19 at 12:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.