Skip Navigation

[Resolved] wpv_filter_query & wpv_filter_query_post_process not firing

This support ticket is created 6 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by zacharyL 6 years, 8 months ago.

Assisted by: Luo Yang.

Author
Posts
#555457
Screen Shot 2017-08-01 at 19.43.07.png

I am trying to: Filter a Toolset-driven WooCommerce WordPress Archive using the wpv_filter_query & wpv_filter_query_post_process filters and they aren't firing at all

Link to my site: hidden link

I expected to see: My breakpoints triggering

Instead, I got: Nothing

Things I've confirmed:
- Toolset is powering the view linked above
- My IDE's breakpoints are working otherwise
- My plugin is activated and working otherwise
- These 2 filters are in your documentation: https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_query

I have a ran a backup of our staging site, but it is our in-development site, so please don't change anything major without warning us and please change things back when you're done if you do change anything.

#555526

Dear zachary,

This is expected result,
I assume we are talking about a taxonomy archive page, the filter wpv_filter_query and wpv_filter_query_post_process onl work for the normal view, it does not work for wordpress archive page, see our document:
wpv_filter_query
https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_query
DescriptionWhen displaying a View listing posts, this filter is applied to the arguments being generated by the View settings before they are passed to the WP_Query class.

In your case, I suggest you try to add your own custom filters with wordpress built-in action hook "pre_get_posts", more help:
https://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_posts

#555890

Ahh. Thanks!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.