Support » Themes and Templates » show posts from only one catagory

  • hey everyone 🙂

    im working on a website for a client that wants to have his posts displayed in each of the three columns of the website (ie i’ve created three categories (left, middle, right) and i thought it would be easy to tell my template to grab all the posts from each category and put them in their respective columns…. i’ve searched and researched and all i’ve come up with is this:

    <?php query_posts('category_name=Middle','showposts=1');

    the above is wasn’t working… my php skills are very minimal, so any help would be greatly appreciated 🙂

    thanks in advance!

Viewing 1 replies (of 1 total)
  • <?php $top_query = new WP_Query('showposts=YYY&cat=XXX'); ?>

    That should do it. XXX being either the category name or number, bit extra in there is showposts=YYY (replace YYY with number) which you can limit the amount of posts you want. Just delete that out if you want all of them.

Viewing 1 replies (of 1 total)
  • The topic ‘show posts from only one catagory’ is closed to new replies.