• Hi,

    I was just reading an article at Viperchill about editing the way title tags are created by default in wordpress…. and I’m not sure what he means, or how to do it

    The advise is to to show the post title by itself and then choose a title for the homepage. My code for this being:

    <title><?php if(is_home()) { echo ‘Viral Marketing : ViperChill’; } else { wp_title(”) ;} ?></title>

    If my current header.php reads like 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', 'twentyten' ), max( $paged, $page ) );
    
    	?></title>

    Where would the suggested code bove go?

    Is it ok just to add it in as an extra piece of code, or should I remove the original code and replace it?

  • The topic ‘Change the title tage’ is closed to new replies.