• Resolved KevinKane

    (@kevinkane)


    If you search for “Copyblogger writing,” the first result is “How to Write Magnetic Headlines | Copyblogger.”

    The post title “How to Write Magnetic Headlines” is listed before the blog title, “Copyblogger.”

    How can I do that for my blog?

    If you search for “7 predictions for future of computers,” the first result is “Kevin’s Notes ? 7 Predictions for the Future of Computers.”

    I want to rearrange the order so it shows: “7 Predictions for the Future of Computers | Kevin’s Notes”

    Does anyone know how to do this? Thank you.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Try using something like:

    <title><?php global $page, $paged;
    wp_title( '|', true, 'right' );
    bloginfo( 'name' );
    $site_description = get_bloginfo( 'description', 'display' );
    if ( $site_description && ( is_home() || is_front_page() ) ) echo " | $site_description";
    ?></title>

    in header.php

    Thread Starter KevinKane

    (@kevinkane)

    Esmi, thanks.

    If I use your code above, should I delete the code below (which is in my header.php right now):

    <!-- code to control titles in search engine results START -->
    <?php if (is_single() || is_page() || is_archive()) { wp_title('',true); } else { bloginfo('description'); } ?> — <?php bloginfo('name'); ?>
    <!-- code to control titles in search engine results END-->

    Yes but please keep a backup copy of header.php in case there’s a syntax error in the code that I posted.

    Thread Starter KevinKane

    (@kevinkane)

    esmi, I swapped my old code with the new code you provided.

    I then did a Google search and I see that my blog title still precedes my post title.

    Does this mean that the new code doesn’t work? Or does it take some time for Google to index with the new code? Thanks.

    It could take anything up to 90 days for Google to re-index all of your posts.

    Thread Starter KevinKane

    (@kevinkane)

    Esmi, I’ll write a follow-up post later to let you know if this code changes the way Google displays my posts. Thanks.

    Thread Starter KevinKane

    (@kevinkane)

    I found the solution!

    Install the WordPress plugin “All in One SEO Pack.”

    The plugin’s default format for post titles is:

    "%post_title% | %blog_title%"

    You don’t have to change any of the plugin’s settings or edit any code.

    You will see the SERP changes in a day or so.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How do you make your post title precede your blog's title in search results?’ is closed to new replies.