WordPress.org

Ready to get started?Download WordPress

Forums

how do I remove meta describe from title on twentyten theme (5 posts)

  1. sniperfora
    Member
    Posted 3 years ago #

    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

  2. sniperfora
    Member
    Posted 3 years ago #

    bump

  3. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    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";
  4. sniperfora
    Member
    Posted 3 years ago #

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

  5. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags