Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

share|improve this question
add comment

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.

<title>
<?php
bloginfo('name'); // this is the blog name
echo ' | '; // seperator
if(is_front_page())
{
    // what you want for the home page here
}
else
{
    bloginfo('description'); // this is the slogan
}
</title>

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:

<title><?php
/*
 * 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 ) );

?></title>
share|improve this answer
    
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? –  Sally Lennox Apr 13 '12 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. –  Sally Lennox Apr 13 '12 at 1:18
    
Found it!! Thanks for your help. It was under the General Settings. –  Sally Lennox Apr 13 '12 at 1:20
add comment

Go to admin dashboard > Settings > General

You are getting General Settings...

All Settings is be their....

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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