WordPress.org

Ready to get started?Download WordPress

Forums

Horizontal Rule between posts (8 posts)

  1. Tundra
    Member
    Posted 8 years ago #

    Ho do I get wordpress to insert a horizontal rule at the end of each of posts?

  2. Michael Bishop

    Posted 8 years ago #

    In your index.php file, just before the close of The_Loop you can add the horizontal rule. That way after each post, it places the rule. If you have a hard time finding the loop after reading the link, check back.

  3. Tundra
    Member
    Posted 8 years ago #

    I've looked at the 'The Loop' and have tried ading <hr> but its not appearing in my posts. Where exactly do I place the <hr> to get it to display at the end of a post?

  4. Michael Bishop

    Posted 8 years ago #

    You should be able to place it before <?php endforeach; else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    <?php endif; ?>

    make sure your theme doesn't have hr {display: none} in the style sheet, otherwise, you won't see the rule.

  5. Tundra
    Member
    Posted 8 years ago #

    Hi,

    Thanks for your help, I'm still can't find the code you mentioned.

    I've pasted in a copy of the Loop template, Could you take a look at it?

    <snip>template code from K2</snip>

  6. Tundra
    Member
    Posted 8 years ago #

    I don't appear to have an Index.php file with K2

  7. Samuel B
    moderator
    Posted 8 years ago #

    You better get one then. :>)
    Go to admin -> Presentation -> Theme editor
    lick on "Main Index Template". That is your index.php.

  8. Michael Bishop

    Posted 8 years ago #

    You should check with the folks at http://binarybonsai.com/forums and get the lowdown on the custom loop used in K2. The code I offered is for more traditional themes.

Topic Closed

This topic has been closed to new replies.

About this Topic