WordPress.org

Ready to get started?Download WordPress

Forums

Show 1 post from each category in a grid? (2 posts)

  1. gashface
    Member
    Posted 2 years ago #

    I am trying to use the following code to show 1 post from a selected number of category's whilst remaining in the grid, which is the bpr etc. code...

    <?php
    $c = 1; //init counter
    $bpr = 3; //boxes per row
    if(have_posts()) :
    query_posts('cat=9,12,13,14,15,16,17&showposts=7');
    while(have_posts()) :
    
    the_post();
    ?>

    how would I go about doing this?

    Thanks

  2. gashface
    Member
    Posted 2 years ago #

    Or actually this may work better, these categories are all in a parent category, so get 1 child category from the parent category and display 1 post from each of those child categories?

Topic Closed

This topic has been closed to new replies.

About this Topic