• Resolved Globespy

    (@globespy)


    Sorry if this has been asked a bunch of times. I searched extensively on the net before coming here….
    I am using ‘twenty ten’ and whilst it has an option in general settings where I can simply leave the site title ‘blank’, I have read that this can cause issues with the site ebing found etc.

    I found posts from ‘Sadish’ where he offered several ways to do remove the site title from the ‘header.php’ file with feedback from one poster that these methods caused problems with the site. The poster suggested adding some code that basically moved the site title to a part of the page that can’t be seen…but can still be found by readers.
    Then I read that this change needs to be made on the css, not the header.
    Seriously…..for something that SHOULD be simple, why is it not?
    Most folks will want to upload a custom image to their site that will have the site title in it…..so the idea of having an ugly field of text above their fancy new image is just not pretty. And to make it worse, it’s not like they can edit the font of the title (at least not on twenty ten).
    So why is this so difficult, and can someone make it easier with some decent step by step instructions.
    I am sure this would be appreciated by many people…
    Thanks!

Viewing 9 replies - 1 through 9 (of 9 total)
  • If you add text-indent: -1000px; to the header title section in your themes css file you can simply move the title left and outside the browser, so that it won’t be displayed in the browser.
    You can adjust the indentation number to fit your needs, some people use full HD monitors now, so a larger number may be appropriate in some cases.

    Thread Starter Globespy

    (@globespy)

    how do I identify the ‘header title section’ in the css? Where is it? The theme has two css files:

    editor-style.rtl.css
    editor-style.css

    Thanks.

    Thread Starter Globespy

    (@globespy)

    There’s no word ‘header’ in either of these css files.

    Thread Starter Globespy

    (@globespy)

    I found some stuff that mentioned ‘header’ in the header.php file.
    Pasting it below and perhaps you could tell me where I need to insert this new code?
    Thanks a bunch:

    <?php
    /**
    * The Header for our theme.
    *
    * Displays all of the <head> section and everything up till <div id=”main”>
    *
    * @package WordPress
    * @subpackage Twenty_Ten
    * @since Twenty Ten 1.0
    */
    ?><!DOCTYPE html>
    <html <?php language_attributes(); ?>>
    <head>
    <meta charset=”<?php bloginfo( ‘charset’ ); ?>” />
    <title><?php
    /*
    * Print the <title> tag based on what is being viewed.
    * We filter the output of wp_title() a bit — see
    * twentyten_filter_wp_title() in functions.php.
    */
    wp_title( ‘|’, true, ‘right’ );

    ?></title>
    <link rel=”profile” href=”http://gmpg.org/xfn/11&#8243; />
    <link rel=”stylesheet” type=”text/css” media=”all” href=”<?php bloginfo( ‘stylesheet_url’ ); ?>” />
    <link rel=”pingback” href=”<?php bloginfo( ‘pingback_url’ ); ?>” />
    <?php
    /* We add some JavaScript to pages with the comment form
    * to support sites with threaded comments (when in use).
    */
    if ( is_singular() && get_option( ‘thread_comments’ ) )
    wp_enqueue_script( ‘comment-reply’ );

    /* Always have wp_head() just before the closing </head>
    * tag of your theme, or you will break many plugins, which
    * generally use this hook to add elements to <head> such
    * as styles, scripts, and meta tags.
    */
    wp_head();
    ?>
    </head>

    <body <?php body_class(); ?>>
    <div id=”wrapper” class=”hfeed”>
    <div id=”header”>
    <div id=”masthead”>
    <div id=”branding” role=”banner”>
    <?php $heading_tag = ( is_home() || is_front_page() ) ? ‘h1’ : ‘div’; ?>
    <<?php echo $heading_tag; ?> id=”site-title”>
    <span>
    ” title=”<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>” rel=”home”><?php bloginfo( ‘name’ ); ?>
    </span>
    </<?php echo $heading_tag; ?>>
    <div id=”site-description”><?php bloginfo( ‘description’ ); ?></div>

    <?php
    // Check if this is a post or page, if it has a thumbnail, and if it’s a big one
    if ( is_singular() &&
    has_post_thumbnail( $post->ID ) &&
    ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), ‘post-thumbnail’ ) ) &&
    $image[1] >= HEADER_IMAGE_WIDTH ) :
    // Houston, we have a new header image!
    echo get_the_post_thumbnail( $post->ID, ‘post-thumbnail’ );
    else : ?>
    <img src=”<?php header_image(); ?>” width=”<?php echo HEADER_IMAGE_WIDTH; ?>” height=”<?php echo HEADER_IMAGE_HEIGHT; ?>” alt=”” />
    <?php endif; ?>
    </div><!– #branding –>

    <div id=”access” role=”navigation”>
    <?php /* Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff */ ?>
    <div class=”skip-link screen-reader-text”>“><?php _e( ‘Skip to content’, ‘twentyten’ ); ?></div>
    <?php /* Our navigation menu. If one isn’t filled out, wp_nav_menu falls back to wp_page_menu. The menu assiged to the primary position is the one used. If none is assigned, the menu with the lowest ID is used. */ ?>
    <?php wp_nav_menu( array( ‘container_class’ => ‘menu-header’, ‘theme_location’ => ‘primary’ ) ); ?>
    </div><!– #access –>
    </div><!– #masthead –>
    </div><!– #header –>

    <div id=”main”>

    There is also a style.css, and this is the main file for most of the styles used in the entire theme, including the header title section.

    This is not normally an issue, but if it isn’t listed on the theme edit page inside the wordpress control panel on your site, you can fetch it from your server and edit it locally on your computer, then upload it back to the same location.

    You may add style=”text-indent:-1000px;” to any div in the php files to move text contained in that div out to the left, but the regular way to do it is in the css.

    Thread Starter Globespy

    (@globespy)

    Thanks so much for help thus far, and yes I did find the style.css file 🙂

    I looked through it and found this section, and wondered if this is where I need to add what you suggested? If so, where should I add it?
    I am new to this as you must be able to tell.

    /* =Header
    ————————————————————– */

    #header {
    padding: 30px 0 0 0;
    }
    #site-title {
    float: left;
    margin: 0 0 18px 0;
    width: 700px;
    font-size: 30px;
    line-height: 36px;
    }
    #site-title a {
    color: #000;
    font-weight: bold;
    text-decoration: none;
    }
    #site-description {
    clear: right;
    float: right;
    font-style: italic;
    margin: 14px 0 18px 0;
    width: 220px;
    }

    I would add it as the last line under both these:

    #site-title {
    float: left;
    margin: 0 0 18px 0;
    width: 700px;
    font-size: 30px;
    line-height: 36px;
    text-indent:-1000px;
    }

    and

    #site-title a {
    color: #000;
    font-weight: bold;
    text-decoration: none;
    text-indent:-1000px;
    }

    I’m pretty sure you only need it in the first one though. The second one styles the title link, but the title is already moved out left, so it wouldnt be visible anyway.

    Thread Starter Globespy

    (@globespy)

    Thanks so much!
    You are the best!!!

    No problem 🙂

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Need Straight Answer on best way to remove site title from header….’ is closed to new replies.