Tag Info

New answers tagged

0

Not sure why you would try this with taxonomy. I would suggest making a meta_key "country" with the values. Then you can query it like in the documentation: $user_query = new WP_User_Query( array( 'meta_key' => 'country', 'meta_value' => 'Israel' ) ); Not sure why your taxonomy-query doesnt work, looks fine also, i use it like this for my ...


1

My SQL knowledge is quite bad, I should admit, so I'm going to use a non SQL way to achieve this. Here is my idea: Use pre_get_posts to alter the query variables before the main query is executed. As all of the query variable has been set by the time pre_get_posts run, you can simply change them as needed, and also, the conditional tags are available, so ...


1

I may suggest not combining each of these into hierarchical taxonomies, but setting up 3 distinct taxonomies. It seems like they are 3 unrelated properties of the photos, and thus, I would separate the code for them. Then you're not trying to code around nested taxonomy terms, but you can access them each individually. The taxonomies would be color, location ...


0

I'll put my money to it and say it has something to do with this line 'eventDisplay' => 'all', Can't make sense of what this line actually do. I would just remove it. Also, just a tip, do not use hyphens (-) in taxonomy or custom post type names. They will definitely be troublesome if it comes to custom templates. If you must, use an underscore (_) ...



Top 50 recent answers are included