The Stack Overflow podcast is back! Listen to an interview with our new CEO.
Sep
29
awarded  Popular Question
Aug
30
answered Can't Target a Widget's Elements using jQuery
Aug
30
awarded  Editor
Aug
30
revised Can't Target a Widget's Elements using jQuery
added 121 characters in body
Aug
30
asked Can't Target a Widget's Elements using jQuery
Aug
16
awarded  Teacher
Aug
16
answered Browsing Revisions in Custom Post Types takes me Empty Post Listing
Aug
14
answered is_post_type_archive is false when I pass GET parameters in the URL
Aug
14
asked is_post_type_archive is false when I pass GET parameters in the URL
Jul
29
asked Why is a CPT's meta for 'Allow Comments' false in Gutenberg?
May
20
awarded  Tumbleweed
May
13
asked Browsing Revisions in Custom Post Types takes me Empty Post Listing
May
5
comment $query->is_main_query() is causing query's tax_query to be ignored
That was it. So I am working on a plugin that filters post types based on taxonomies via a drop down menu. I had set the pre_get_posts query correctly, but these were not affecting the main query, so yes, what realised that in my logic, I was creating a new WP_Query to display results when I should've checked that the query already came in and had results in it and should've used that one instead. Bit of a mess, but you definitely helped me catch a very difficult to spot mistakes - thanks again!
May
5
accepted $query->is_main_query() is causing query's tax_query to be ignored
May
5
comment $query->is_main_query() is causing query's tax_query to be ignored
I think you might have nailed it right in the head...I'll do some debugging and report back, appreciate the guidance and the logic in your train of thought!
May
5
asked $query->is_main_query() is causing query's tax_query to be ignored
May
4
awarded  Supporter
May
3
comment My Main Query Modification is Messing up my dynamic main - why?
You were absolutely right, not sure what I was testing when I wrote the code, thanks!
May
3
accepted My Main Query Modification is Messing up my dynamic main - why?
Apr
25
comment My Main Query Modification is Messing up my dynamic main - why?
Thanks for the response. I thought of that and tried it as soon as I posted my question but the menu keeps disappearing even when I use $query->is_main_query(). In case you'd like to see my entire query code, it's here-> link.scorpiotek.com/p5y