Title: Complex query (?) problem
Last modified: August 18, 2016

---

# Complex query (?) problem

 *  [stew278](https://wordpress.org/support/users/stew278/)
 * (@stew278)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/complex-query-problem/)
 * Wondering if someone might help me out here with a problem … my apologies if 
   this isn’t making sense, but if someone could help, I can try to better explain
   myself and problem if I’m not communicating the best here.
 * I’ve got a site where I have set 2 categories, 1 with multiple sub-categories–
   we’ll call them 1 and 2 (children of 2 are 3, 4, and 5). On my main page, category
   2 is a random entry of it’s children, while category 1 displays below that. When
   you go to the previous entry of category 1, the page should display the same 
   way – randomly selecting category 2’s children (3, 4, and 5) with category 1 
   below.
 * However, category 2’s children are also category pages where I have a comments
   link and the page still renders out as it does on the main page – which I don’t
   want to happen. I would like to pass a variable (?) that says, “if this single
   page is from categories 3, 4, or 5, do not display the parent category (2) above
   the entry below (which would actually be 3, 4, or 5).
 * Is there someone that can help a pretty basic noob understand how to make this
   happen?

The topic ‘Complex query (?) problem’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [stew278](https://wordpress.org/support/users/stew278/)
 * Last activity: [20 years, 2 months ago](https://wordpress.org/support/topic/complex-query-problem/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
