Title: mdr21's Replies | WordPress.org

---

# mdr21

  [  ](https://wordpress.org/support/users/mdr21/)

 *   [Profile](https://wordpress.org/support/users/mdr21/)
 *   [Topics Started](https://wordpress.org/support/users/mdr21/topics/)
 *   [Replies Created](https://wordpress.org/support/users/mdr21/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/mdr21/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/mdr21/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/mdr21/engagements/)
 *   [Favorites](https://wordpress.org/support/users/mdr21/favorites/)

 Search replies:

## Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Exclude posts from children categories with query_posts/get_posts](https://wordpress.org/support/topic/exclude-posts-from-children-categories-with-query_postsget_posts/)
 *  [mdr21](https://wordpress.org/support/users/mdr21/)
 * (@mdr21)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/exclude-posts-from-children-categories-with-query_postsget_posts/#post-988894)
 * Hello,
    Post from my children/grandchildren categories are showing up in the 
   parent categories and ordered by date. So they will show up before the current
   categories post if published later. I don not have each category checked in the
   post, just the appropriate one.
 * I just want the current categories post to take precedence. So
    House cat has
   a post, its children/grandchildren have posts. If on the parent ‘House’ category
   that post should show first.
 * I am now using the code listed above but like so:
 * `$cat_posts->query(array('category__in' => array($cat),'posts_per_page'=>1,'order'
   =>DESC));`
 * I now cant have previous links for the subcategory articles though. Is this the
   completely wrong way to handle a category-based theme.
 * Thank you for any insight.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Show post of current category before its children](https://wordpress.org/support/topic/show-post-of-current-category-before-its-children/)
 *  Thread Starter [mdr21](https://wordpress.org/support/users/mdr21/)
 * (@mdr21)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/show-post-of-current-category-before-its-children/#post-1032604)
 * Sorry, the subcats should be indented
 * > Homes (Top Category)
    > > Red House > > > Red House Price > > > Red House Size
   > >Green House > > > Green house price > > > Green house Size

Viewing 2 replies - 1 through 2 (of 2 total)