• Resolved Matt

    (@mattwilkie-1)


    So after an exhaustive search I’m yet to solve my problem. What I’ve stubbled across is a rather frustrating floating issue, where by every third post is moving to the right.

    I’ve seen some samples where by I can count up the posts and issue a <div style=”clear:both”></div> on every third post. Are there any samples on how best to do this and where to apply the code?

    if ( have_posts() ) : while( have_posts() ) : the_post(); $count++;
        //Loop code goes here. Blah Blah.
        //Your code from above goes next
        if ( 0 == $count%3 ) {
            echo 'div class="clear"></div>';
        }
    endwhile; //ending the loop
    if ( 0 != $count%3 ) {
       echo 'div class="clear"></div>';
    }

    This is what I’m looking at, I’ve tried applying this to the ‘posts_loo_template.php’ with little success.

    https://wordpress.org/plugins/posts-in-page/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Eric Amundson

    (@sewmyheadon)

    Hi matt.wilkie,

    Since Posts in Page takes care of the loop for you, you wouldn’t want to create a custom loop inside of the template.

    Honestly, I’d approach this by creating a custom template that doesn’t rely on Posts in Page and writing a custom loop as you’ve done above.

    Make sense?

    Thread Starter Matt

    (@mattwilkie-1)

    Thanks Eric,

    I will be sure to investigate further.

    Best regards,

    Matt

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Post Wrapping out of position’ is closed to new replies.