WordPress.org

Ready to get started?Download WordPress

Forums

CSS Won't Hide Site Title/Tagline (3 posts)

  1. TanHeart
    Member
    Posted 1 year ago #

    Hi;

    I'm trying to hide the site title and tagline but none of these work:
    #wp_title, #$site_description {display: none;}
    #site-title, #site-description {display: none; }
    #site-title, #site-description { visibility: hidden;; }
    #header #logo h1 a {display: none;}

    This is the header code in my site editor that I think deals with what to write in order to hide the site title and tagline:
    <?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', 'made' ), max( $paged, $page ) );
    ?>

    Can someone PLEASE tell me what to put at the end of the style sheet to hide the site title and tagline from my site? I DO NOT want to delete the site title and tagline in my general settings because then it won't show in the browser tab.

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    I DO NOT want to delete the site title and tagline in my general settings because then it won't show in the browser tab.

    I don't think they're related. That'll be a <title> element.

    It'll be much more helpful if you could post the HTML and not PHP.

  3. alchymyth
    Forum Moderator
    Posted 1 year ago #

    try using a browser inspection tool to find out what css classes or css ids are used on the site title and description (this is theme specific).

    you can also post a link to your site;
    and post the name of your theme.

    the shown code snippet is for the meta title which appears in the browser tab, and has nothing to do with the site title and description which appears in the site.

Topic Closed

This topic has been closed to new replies.

About this Topic