Support » Plugin: Yoast SEO » Twenty Ten titles and WordPress SEO

  • Resolved  

    (@cor-van-noorloos)


    When using WordPress SEO on Twenty Ten with no extra title settings enabled it seems all titles of newly created posts and pages are still replaced by something.

    Ie. ‘post/pagetitle | sitetitle’ would suddenly be rewritten to ‘ – sitetitlesitetitle’ (not a typo)

Viewing 6 replies - 1 through 6 (of 6 total)
  • Tristan

    (@mrt209)

    I have the same problem. I’ve set it to only show the post title for my posts but in google search it displays the title and – Site Name.

    Carlos Correza

    (@journihilist)

    twentyten already has some conditional logic for titles.

    wp_title( '|', true, 'right' );

    try removing the variables from the wp_title tag like so:

    wp_title( '' );

     

    (@cor-van-noorloos)

    Hi Carlos, this seems to work.
    Much appreciated.

    cubexpert

    (@cubexpert)

    I think the correct way to deal with this is the possibility to revert the automatic settings (ajax) that WordPress SEO suggests. There is no way to see that you have allowed WP SEO to change the title, and no way to revert the setting.

    function wpseo_autogen_title_callback() {
    $options = get_wpseo_options();
    $p = get_post($_POST[‘postid’], ARRAY_A);
    $p[‘post_title’] = stripslashes($_POST[‘curtitle’]);
    if ($options[‘title-‘.$p[‘post_type’]] != ”)
    echo wpseo_replace_vars($options[‘title-‘.$p[‘post_type’]], $p );
    else
    echo $p[‘post_title’] . ‘ – ‘ .get_bloginfo(‘name’);
    die();
    }
    add_action(‘wp_ajax_wpseo_autogen_title’, ‘wpseo_autogen_title_callback’);

    Carlos Correza

    (@journihilist)

    @cubexpert um.. yeah I guess you could do that. but for that matter you could use a simple if function exists else return the default values.

    Or you could just change the wp_title tag in header.php the way the plug-in’s control panel suggests. that is …assuming you actually going to use the seo plugin to generate your titles.

    Im just confused as to why you did it the way you did.

    Plugin Author Joost de Valk

    (@joostdevalk)

    I don’t entirely get what cubexpert is aiming at either…

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Twenty Ten titles and WordPress SEO’ is closed to new replies.