remove_action – pre_get_posts – does not restore original query
OK, so first of all – AJAX requests are separate, so you don’t have to remove_action if you haven’t added it earlier… And to be honest, I don’t really get your code – you modify the global wp_query object, but it’s really not so clear how and why is there any query created during AJAX … Read more