Jump to content

Recommended Posts

Posted

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!

Posted (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 by kongondo
Posted

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.   :D

Thanks for the help!

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...