joer80 Posted June 26, 2014 Posted June 26, 2014 My query would be: has_parent=1019, has_parent=1056 Not using the | Say the first one is a state, and the second is a city. My code may build both depending on if the second says all in this state, or only one location. (Children of 1056) If I need to, I can probably change it to clear out the first one, just wanted to know if having more than one is possible! Thanks!
kongondo Posted June 26, 2014 Posted June 26, 2014 (edited) Yes, you can use the selector that way (i.e. | will not work, but multiple declarations are fine)...although in your example, I don't see the need of the State since what you really want are the City's children? Meaning, you don't actually need has_parent but $variable->children() ? Edited: Clarifications Edited June 26, 2014 by kongondo
joer80 Posted June 26, 2014 Author Posted June 26, 2014 You are correct. I am going to try to take it out soon but the code right now passes both! It was a weird situation where the pages may or may not have a city as a parent. Thanks for the help!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now