Support » Themes and Templates » can't find where a stray /h tag is coming from for only the FRONT and BLOG pages

  • I am having a space issue around the menu, but believe I have it isolated down to an stray </h1> tag. http://www.rastaging4.com/index.php/about/

    The ‘home/front’ page is set to be ‘static’ while the ‘blog’ is on the ‘Whats Going On’ page. Both these pages are not having the spacing problem.

    Go to any other page (About, Admission etc) and there is a white space between the header graphic and the menu bar. I’m not using any kind of page templates.

    I did find on the home/blog pages in the html a straggling </h1>

    <div id="branding" role="banner">
    </h1>
    <img src=

    and that these two pages use <h2 class=”entry-title”>PAGE TITLE HERE</h2>….

    while the other pages don’t have the straggling </h1> and use <h1 class=”entry-title”>PAGE TITLE HERE</h1>.

    I can’t find where the heck the little lost </1> is coming from. :-\

    While investigating that I found this on page.php (and it may answer why the H title tags are different)…

    <?php if ( is_front_page() ) { ?>
    <h2 class="entry-title"><?php the_title(); ?></h2>
    <?php } else { ?>
    <h1 class="entry-title"><?php the_title(); ?></h1>

    … but why does it do this (why H2 if it is the front page, and h1 if it is all other pages)? 🙂

    Danke’

Viewing 3 replies - 1 through 3 (of 3 total)
  • Michael

    (@alchymyth)

    Forum Moderator

    the theme is based on twenty ten –

    this is the opening code (you probably removed this to get rid of the title):

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

    and this is the closing code:

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

    (there are quite a few people so far, that have overseen this.)

    on any other pages than the frontpage, this gives you a </div> which prematurely closes the #branding div.

    AWESOME – sometimes all you need is an extra pair of eyes 🙂

    Thanks

    Michael

    (@alchymyth)

    Forum Moderator

    you are welcome 😉

    sometimes all you need is an extra pair of eyes 🙂

    … with the grey stuff attached – lol.

    if this is all sorted – please mark the thread as ‘resolved’

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘can't find where a stray /h tag is coming from for only the FRONT and BLOG pages’ is closed to new replies.