Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/is main query #84

Merged
merged 4 commits into from
Nov 25, 2020
Merged

Feature/is main query #84

merged 4 commits into from
Nov 25, 2020

Conversation

lipemat
Copy link
Contributor

@lipemat lipemat commented Jan 9, 2020

Support using $query->is_main_query() when ES_WP_Query is replacing WP_Query

Automatically passed a query_var which is later used within an override method of is_main_query during pre_get_posts actions.

Fixes #38

@WPprodigy
Copy link

WPprodigy commented Jan 9, 2020

I like this approach. What do you think about using es_is_main_query instead, mainly to go a little bit out of the way to avoid potential conflicts?

With some tests, this should be a safe addition and a good solution for 38.

@lipemat
Copy link
Contributor Author

lipemat commented Jan 9, 2020

I like this approach. What do you think about using es_is_main_query instead, mainly to go a little bit out of the way to avoid potential conflicts?

That is a great suggestion! I have updated the code.

@rebeccahum
Copy link
Contributor

Tested & works great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

is_main_query() returns false
4 participants