Support » Themes and Templates » changing location of H1 tag in twentyten

Viewing 10 replies - 1 through 10 (of 10 total)
  • govpatel

    (@govpatel)

    it is in style.css

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

    }
    #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;

    }

    This code is where you need make changes

    vijayrajesh

    (@vijayrajesh)

    Hi,

    I think mostly you need to edit on the PHP file only and rarely on the CSS.

    Can you tell me exactly where you need to put the h1 tag?

    loversinc

    (@loversinc)

    thanks vijayrajesh

    I would like the h1 to go here: ‘<div id=”site-description”><?php bloginfo( ‘description’ ); ?></div>’

    and not here: ‘<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”>
    <img id=”logo” src=”<?php echo home_url( ‘/’ ); ?>wp-content/themes/twentyten/images/logo.png” alt=”Elink Logo” />

    </span>’

    vijayrajesh

    (@vijayrajesh)

    Hi loversinc,

    you want to convert site description into h1 tag?

    loversinc

    (@loversinc)

    currently the logo is h1 tag and I would like the site description to be h1 tag instead.

    vijayrajesh

    (@vijayrajesh)

    Hi,

    Just replace “<div id=”site-description”><?php bloginfo( ‘description’ ); ?></div>”

    with “<div id=”site-description”><h1><?php bloginfo( ‘description’ ); ?></h1></div>”

    BUT IT IS IMPORTANT that the H1 tag font size will be different now. So, you may need to change the font style in css.

    Also, you may need to remove the h1 tag for logo. Because, In SEO, i think there should be only one h1 tag.

    Thank you,

    loversinc

    (@loversinc)

    thanks for this.
    would you also be able to help me remove the h1 tag for the logo as it is not use in a way that I understand ‘ ‘<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”>
    <img id=”logo” src=”<?php echo home_url( ‘/’ ); ?>wp-content/themes/twentyten/images/logo.png” alt=”Elink Logo” />

    </span>’
    thanks

    Hi again, is anyone able to help with this?

    Michael

    (@alchymyth)

    Forum Moderator

    the header ‘h1 tag’ (which is actually a h1 or a div, depending on the page) is opened with these lines:

    <?php $heading_tag = ( is_home() || is_front_page() ) ? 'h1' : 'div'; ?>
    				<<?php echo $heading_tag; ?> id="site-title">

    and closed with this line:

    </<?php echo $heading_tag; ?>>

    make a backup copy of your working theme files before editing

    remove all these lines to remove the ‘h1 tag’ totally.

    thanks for this.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘changing location of H1 tag in twentyten’ is closed to new replies.