ThemeShaper Forums » Thematic


Customize Last (Not Latest) Post

(2 posts)
  • Started 2 years ago by osedax
  • Latest reply from helgatheviking
  • This topic is not resolved
  1. osedax

    I want to have place a div between my posts, which functions like an <hr> tag. I only want this to show up between posts, so I'd like to avoid having it appear after the final post on the page. I tried code from another forum, but it isn't working for some reason.

    I used this code just before the endwhile statement and the closing curly bracket:

    <?php if( ($wp_query->current_post + 1) < ($wp_query->post_count) ) :?>
    <span class="finalHR"></span>
    <?php else :?>
    <?php endif;?>

    This makes sense to me, so I don't know why it doesn't work. Any light shed on this issue would be a huge help.

    Posted 2 years ago #
  2. well you don't say where you are adding said code, so how on earth could we tell you why it isn't working as you'd expect. you have to provide way more detail if you want people to actually be able to help you.

    additionally, you should explain why you are trying to do this, b/c adding an empty div seems like you are bloating the code for no reason.

    Posted 2 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.