WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Tagline appearing in both home and blog pages (8 posts)

  1. pochicken
    Member
    Posted 1 year ago #

    My site is http://www.smtsmodels.com using the 'Twenty Eleven' theme.

    The tagline is appearing in the browser title for both pages. The rest of the pages are fine it is just home and blog.

    Any ideas please?

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    Isn't this the same query as your last thread?

  3. pochicken
    Member
    Posted 1 year ago #

    Hi Andrew,

    The thread you mention is not related as that is to do with formatting (pages keep resizing).

  4. pochicken
    Member
    Posted 1 year ago #

    I have not edited the original theme and have made sure all the files are the original one's.

    I think this might be something to do with the blog not being on the home page and somehow I have two blog or home pages (sorry this is not very clear!)

  5. alchymyth
    Forum Moderator
    Posted 1 year ago #

    The tagline is appearing in the browser title for both pages.

    Twenty Eleven uses this code in header.php for the meta title, related to your question:

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

    this ( is_home() || is_front_page() ) makes sure to show the site's tagline on the front page and posts page.
    http://codex.wordpress.org/Conditional_Tags

    you actually have not posted what kind of problem you have with that ...

  6. pochicken
    Member
    Posted 1 year ago #

    Thanks for your response and you have certainly made my understanding clearer on what is going on.

    I have commented out this code in header.php although it removes the tag line on both my home and blog page when I just want it removed from the blog page:

    $site_description = get_bloginfo( 'description', 'display' );

    I do not mind this though as I just want the tag line info to update in my Google search so as long as this does not effect this then I am happy.

    However, I know this is bad practice to edit the theme and you should use a child theme so is there a way to do this using CSS as I have Jetpack installed and I am making use of the 'CSS Stylesheet Editor'

  7. alchymyth
    Forum Moderator
    Posted 1 year ago #

    want it removed from the blog page

    then change only this line:

    if ( $site_description && ( is_home() || is_front_page() ) )

    to:

    if ( $site_description && is_front_page() )

    is there a way to do this using CSS

    no

  8. pochicken
    Member
    Posted 1 year ago #

    Thanks for your help. I will create a child theme and do this.

Topic Closed

This topic has been closed to new replies.

About this Topic