• Hi,
    I am looking to add an hr as a divider between every SECOND post in my main loop. The reason being is that I am using two posts to a row, making 2 columns as the main feed of the blog.

    Can anybody advise how to modify the loop to achieve this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The reason being is that I am using two posts to a row, making 2 columns as the main feed of the blog.

    anby solution will depend on how you are doing this.

    link to your site?
    what is the code of the main loop?
    (please follow the forum guidelines for posting code)

    Declare a variable and count the post. on even number add hr.
    $i = 0;

    with in loop > at the loop end

    $i++;
    if ($i % 2) {
    // odd number
    } else {
    echo '<br />';
    }

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add hr after every second post’ is closed to new replies.