• I’m placing a selection of 3 blog posts on a simple page, and want only those posts from category 15 or 16. I’m able to select category 15 or 16 by itself, but not together.

    I’ve tried category_in and category_and and various other combinations but no luck. If I don’t select just one category, then all categories show on the page.

    This should be simple, but no matter what I try it won’t work. Thanks in advance.

    ‘<?php
    $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1;
    $args = array(
    ‘category_and’ => array(15,16),
    ‘posts_per_page’ => 3,
    ‘paged’ => $paged );
    query_posts($args); ?>’

    The Loop and reset

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Using query_post ()’ is closed to new replies.