Issues Displaying Sub-Categories and Posts
-
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?
The topic ‘Issues Displaying Sub-Categories and Posts’ is closed to new replies.