WordPress.org

Ready to get started?Download WordPress

Forums

Two colums, Two categories - Order issue (4 posts)

  1. bcreighton
    Member
    Posted 6 years ago #

    Hi,

    I am trying to divide my content into two columns, one category to the left, one to the right. However, it is not as simple as looping each in their own div and floating them. Each category posts acts like a pair, with a wrapper div around them like so:

    ---------------------
    cat 1 -------- cat 2
    ---------------------
    cat 1 -------- cat 2
    ---------------------

    I've tried using <?php query_posts('cat=8,9'); ?>

    and using if ( in_category(8) ) { within the loop to divide the content, however cat 2 displays first.

    Any ideas how to get them always to display cat 1 first, then cat 2?

    Thanks!

  2. moshu
    Member
    Posted 6 years ago #

  3. bcreighton
    Member
    Posted 6 years ago #

    No, that example is if I wanted to do

    ----- -----
    cat 1 -------- cat 2
    ----- -----
    cat 1 -------- cat 2
    ----- -----
    cat 1 -------- cat 2
    ----- -----

    without the wrapper div. That would be easy - but alas, my problem is a bit trickier and it needs to be in the same loop.

  4. bcreighton
    Member
    Posted 6 years ago #

    Ha, that diagram did not turn out as expected.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.