• My index page shows 5 most recent posts. I want to have a <hr /> tag seperating these posts. Problem is, if I put the tag below the content in the loop, the last post will have one when it doesn’t need it. How can I determin for example… If last post to be shown “null” else <hr />.

    Maybe there is a more simple way to accomplish this and I am making things to complicated

Viewing 1 replies (of 1 total)
  • You could use CSS to add a top border to each post and then use the :first-child class to remove it on the first post. So something like:

    .post {border-top:1px solid #ccc;}
    #content .post:first-child {border-top:none;}
Viewing 1 replies (of 1 total)
  • The topic ‘Conditional statement to determin if there are more posts to display?’ is closed to new replies.