seo - Remove site name from title post

I want to remove the site-name from title post and used All in One SEO and this is the configuration but in Google searc

I want to remove the site-name from title post and used All in One SEO and this is the configuration

but in Google search the site name display in all title post ( as this )

How can I remove sitename from title post?

I want to remove the site-name from title post and used All in One SEO and this is the configuration

but in Google search the site name display in all title post ( as this )

How can I remove sitename from title post?

Share Improve this question edited Jun 29, 2013 at 2:59 brasofilo 22.1k8 gold badges70 silver badges264 bronze badges asked Jun 28, 2013 at 22:13 user2075379user2075379 92 silver badges7 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 5

Check your theme (header.php). If it uses something like this :

<title><?php wp_title( '|', true, 'right' ); ?></title>

You can use this filter :

add_filter( 'wp_title', 'wpse104667_wp_title' );
function wpse104667_wp_title( $title ) {

    global $post;
    if(
       is_singular() 
       && !is_front_page() 
       && !is_home() 
       && !is_404() 
       && !is_tag()
     )
    $new_title = get_the_title($post->ID) ;
    return $new_title;
}

EDIT: add conditional tags to avoid bad conflicts

If this problem is not caused by your theme, then you are doing this right.

Now when you set %post_titile% go to any post and check source code. If you get what you want under titile tag, then you are good to go. All you have to do now is to wait for google bot to visit your site and collect new informations from your posts.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744618340a4584189.html

相关推荐

  • seo - Remove site name from title post

    I want to remove the site-name from title post and used All in One SEO and this is the configuration but in Google searc

    2天前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信