WordPress.org

Ready to get started?Download WordPress

Forums

Additional category in category page loop (1 post)

  1. Jorim
    Member
    Posted 3 years ago #

    I'm using this code in category.php:

    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    global $wp_query;
    query_posts(
    	array_merge(array(
          'paged' => $paged,
          'posts_per_page' => 8),
    	$wp_query->query
    	)
    );

    But I'd like to show another category on that same page, so I tried:

    query_posts(
    	array_merge(array(
          category__in => array(25,26),
          'paged' => $paged,
          'posts_per_page' => 8),
    	$wp_query->query
    	)
    );

    but that didn't work.

    How do I show posts from category 25 and 26 in the category page of category 25?

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic