WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

closed as off-topic by Pieter Goosen, Mark Kaplun, toscho Oct 17 '14 at 19:40

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 11 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;
}

More info at the WordPress SEO API Docs page.

share|improve this answer
    
this has saved me after days of looking. Thanks! of there a place where i can find out all of these filter fields? how did you find out wpseo_title was the field name? – Dan Hastings Jul 30 '15 at 15:22
    
@DanHastings I edited the answer but it needs to be peer reviewed. Docs are here. – acobster Jan 26 at 19:34

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