Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I use yoast for my seo, indexing, title, sitemap etc.

But I have one issue, for my product pages I want to use costum taxonomy data and yoast doesnt support that. Now I got the code to echo the exact title I want in the product pages but how do I let it overwrite the title set by yoast, or how do I replace the title set by yoast for this specific post type?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

The WPSEO plugin by Yoast has a filter for the title: 'wpseo_title'. You'll need to add something like this:

add_filter('wpseo_title', 'filter_product_wpseo_title');
function filter_product_wpseo_title($title) {
    if(  is_singular( 'product') ) {
        $title = //your code
    return $title;
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.