I am new to WordPress, and have been asked to change a value in the title tag. The title tag is of the format: "site name | slogan" which is set dynamically in the header.php (seems standard code for WordPress from what I can see from other posts).

It is the slogan on the home page only that I need to change. All other pages within the site are ok, I just need to change the home page, and I have no idea if this "slogan" portion of the title is coded somewhere, or set as an attribute etc. Where and how do I change it?? Thanks

2 Answers 2


You can do one of two things. The first, recommended way would be to use a plugin like WordPress SEO. Install it, and replace the <title> tag in your header.php file with:

<title><?php wp_title(''); ?></title>

Or you can change the title only for the home page by using the is_front_page or is_home conditionals.

bloginfo('name'); // this is the blog name
echo ' | '; // seperator
    // what you want for the home page here
    bloginfo('description'); // this is the slogan

That's a bit sloppy though, and I'd recommend looking into using wp_title instead.

Twenty Eleven's header.php has a good example of this:

 * Print the <title> tag based on what is being viewed.
global $page, $paged;

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

// Add the blog name.
bloginfo( 'name' );

// Add the blog description for the home/front page.
$site_description = get_bloginfo( 'description', 'display' );
if ( $site_description && ( is_home() || is_front_page() ) )
    echo " | $site_description";

// Add a page number if necessary:
if ( $paged >= 2 || $page >= 2 )
    echo ' | ' . sprintf( __( 'Page %s', 'twentyeleven' ), max( $paged, $page ) );

  • Thanks for your response. The code from Twenty Eleven you provided above is exactly the code I have in the header.php file. So I think it is the actual header name that I need to change. Do you how I do that? Apr 13, 2012 at 1:12
  • So I think it is the actual blog description that I need to change. Not just dynamically, but permanently for the site. Apr 13, 2012 at 1:18
  • Found it!! Thanks for your help. It was under the General Settings. Apr 13, 2012 at 1:20

Go to admin dashboard > Settings > General

You are getting General Settings...

All Settings is be their....

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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