• Resolved jvphotography

    (@jvphotography)


    Hi, I am trying to display sub-categories and posts related to the parent category only, which I was able to do using the following query_posts:

    query_posts(array(category__in=>array($category_id),meta_key=>post_id,orderby=>meta_value,order=>DESC));

    I noticed though that the posts on subsequent pages will not show. Once I addedin the following argument into the array (category_name=>single_cat_title(”,false)), the subsequent pages began displaying the posts correctly, but then the posts in the sub-categories began displaying under the category as well.

    Is there anyway to have the category name, while excluding it from including the child category posts?

Viewing 1 replies (of 1 total)
  • Thread Starter jvphotography

    (@jvphotography)

    I was able to solve this issue by checking each post to see if it is within the child category and then continuing the loop.

Viewing 1 replies (of 1 total)

The topic ‘Issues Displaying Sub-Categories and Posts’ is closed to new replies.