Yoast SEO
[resolved] Twenty Ten titles and WordPress SEO (7 posts)

  1. Cor van Noorloos
    Posted 5 years ago #

    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)

  2. Tristan
    Posted 5 years ago #

    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.

  3. Carlos Correza
    Posted 5 years ago #

    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( '' );

  4. Cor van Noorloos
    Posted 5 years ago #

    Hi Carlos, this seems to work.
    Much appreciated.

  5. cubexpert
    Posted 5 years ago #

    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 );
    echo $p['post_title'] . ' - ' .get_bloginfo('name');
    add_action('wp_ajax_wpseo_autogen_title', 'wpseo_autogen_title_callback');

  6. Carlos Correza
    Posted 5 years ago #

    @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.

  7. Joost de Valk
    Plugin Author

    Posted 5 years ago #

    I don't entirely get what cubexpert is aiming at either...

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Yoast SEO
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic