• Resolved lizzyb

    (@lizzyb)


    Hi,
    As the title suggests I want to show the page title on all pages EXCEPT for the homepage – this is because the image on the homepage has the title incorporated.

    In the header.php I have tried changing this:
    <?php $heading_tag = ( is_home() || is_front_page() ) ? ‘h1’ : ‘div’; ?>

    to this
    <?php $heading_tag = ( !is_home() || !is_front_page() ) ? ‘h1’ : ‘div’; ?>

    (so adding the ! to make it a NOT)

    but that didnt work.

    Can anyone help?
    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Try changing:

    <?php $heading_tag = ( is_home() || is_front_page() ) ? 'h1' : 'div'; ?>
    <<?php echo $heading_tag; ?> id="site-title">
    <span>
    <a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
    </span>
    </<?php echo $heading_tag; ?>>
    <div id="site-description"><?php bloginfo( 'description' ); ?></div>

    to

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

    in header.php

    Thread Starter lizzyb

    (@lizzyb)

    Hi Esmi,

    Thanks for the response but this took the title off every page.
    Not to worry – I decided yesterday after trying and trying without sucess to alter the homepage image and take the text off so it loooks ok with the title on the homepage now.

    Thanks for your help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Twenty ten theme – show blog title on all but the homepage’ is closed to new replies.