Support » Themes and Templates » how do I remove meta describe from title on twentyten theme

  • sniperfora

    (@sniperfora)


    hello
    my website name is for example is “sami blog”
    and what I wrote in describe is “my life and other thing”

    so when I go to my site the title of it in my firefox look like this
    “sami blog my life and other thing”

    I want just shown “sami blog” on title

    how can I do that ?

    thank you

Viewing 4 replies - 1 through 4 (of 4 total)
  • sniperfora

    (@sniperfora)

    bump

    Michael

    (@alchymyth)

    Forum Moderator

    edit header.php of TwentyTen:

    <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>

    change it as needed; i.e. maybe delete this part:

    // 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";
    sniperfora

    (@sniperfora)

    oh thank you !
    want to ask how do same thing on post and page ? I want just title of them without frontage title ?

    Michael

    (@alchymyth)

    Forum Moderator

    if i understood what you want, you could try to edit this line (from the code i quoted)

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

    and change it into:

    // Add the blog name.
    	if( is_home() || is_front_page() ) bloginfo( 'name' );

    that would show the blog title only on the front page, and not on posts or pages.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘how do I remove meta describe from title on twentyten theme’ is closed to new replies.