WordPress.org

Forums

jefte.net How is this made? (5 posts)

  1. weeble
    Member
    Posted 10 years ago #

    http://jefte.net/

    How can you have have multiple categories on the same page?

  2. Ming
    Member
    Posted 10 years ago #

    Not quite sure what you're referring to. What exactly is the 'multiple categories'? Do you mean how posts continue over two columns?

  3. weeble
    Member
    Posted 10 years ago #

    yes

  4. monkeynotes
    Member
    Posted 10 years ago #

  5. Ming
    Member
    Posted 10 years ago #

    Here's the theory. Sorry, no code post tonight but hopefully you'll find an example somewhere.

    Ok, he's got 2 columns each with 5 posts. 1-5 runs in the left column and 6-10 runs in the middle column. There's two ways to split posts like this.

    1. Use PHP to count the number of posts as you go through the loop. So you'd create <div id="narrowcolumn1"> and then loop through 5 posts. Then you'd close narrowcolumn (</div>) and open <div id="narrowcolumn2">. When PHP has counted off 5 more posts you'll close narrowcolumn2 (</div>`).

    2. Use can have WordPress run multiple queries. So you'd run 1 loop with a max of 5 posts. Then you'd run another loop also with a max of 5 (but starting at the 6th post). You'll probably find some information on the codex.

    Sorry 'bout the lack of concrete examples. If I get some time I'll swing back.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.