Hello @awol
Can you provide me with URL of the page, where you have this problem?
It could be useful to understand the problem.
Thank you.
Thread Starter
AWOL
(@awol)
Hi @stepasyuk,
Sorry for the delay in replying; I had deactivated the plugin while I tried out other possibilities but I have activated it again now. The site is public, but as you will be able to tell from the url and the little content that it is actually a public test site so that selected people can test out what I am trying to achieve. You can have a look at how your plugin widget acts here – https://testbed.awolonline.net/listing-category/swaps/
Ajax is not enabled (although I don’t think that changes anything in terms of the issue I am having), and the widget is at the bottom of the sidebar. I should also clarify something in my original post – I put that
I don’t have the CL plugin filter active either.
but I missed out the word ‘widget’; also I think the CL plugin is using some kind of filter on the page because it is a Category page, and there is a sorting option at the top (which I have tried in vain to prevent – I can hide it with CSS but I think it is still running; I also tried to edit the template file to remove the action that calls it, but that didn’t work either) but your widget in the free version won’t work on most of the other pages according to the debugging message. I have left debugging on by the way. I hope you can find something to allow me to utilise your useful plugin.
Hi @awol
Thank you for the URL you provided. It seems these listings objects are queried by Custom WP Query, but the Free version of my plugin filters only Main WP Queries. For the custom ones the PRO version should be used.
Or, if it is the Main WP Query it probably can be modified after my plugin and reattaching hook with higher priority could solve the problem. You can check this if you open /filter-everything/src/Plugin.php and modify the string
add_action( 'pre_get_posts', array( $this->wpManager, 'addFilterQueryToWpQuery' ), 9999 );
to
add_action( 'pre_get_posts', array( $this->wpManager, 'addFilterQueryToWpQuery' ), PHP_INT_MAX );
And try to filter with it.
Let me know, if it was helpful for you.
Thread Starter
AWOL
(@awol)
Hi @stepasyuk,
Thanks for the reply – I have tried what you suggested, but it didn’t work unfortunately, so I guess you are correct that it is a Custom WP Query. I will dig into the plugin code to see if I can find out anything more, or if I can find a way around it somehow. I have been able to hack it quite a bit so far, so this is just another learning curve! Thanks for the assistance.