YMC-22 / smart-filter

YMC Smart Filter, allows to solve a variety of tasks for displaying posts on site pages. For advanced developers, there is an opportunity to independently develop layouts for filters and post cards, which makes the plugin universal.
14 stars 6 forks source link

Strange filtering behaviour #42

Closed yanischauvel closed 3 hours ago

yanischauvel commented 3 hours ago

Hi, I need to display, filtering and search in all post (all categories, tags and custom taxonomy) at the first opening (Taxonomy Relation Select taxonomy relation: OR) and then be able to filter with Taxonomy Relation Select taxonomy relation: AND.

I mean for now, if I choose OR in query options, when I select a taxonomy or tag, there are more results. If I select AND in, Query options, I have no results.

The behaviour that I need is:

Display All posts at the first opening and then use filters to restrict the results.

Is it possible?

Thanks for answer

YMC-22 commented 3 hours ago

Hi! You can use the post filter to solve your tasks. The filter has fine-tuning with many options. The Relation parameter is responsible for the logic of selecting posts. If the OR parameter is selected, the number of filtered posts will be greater, otherwise it will be less. The operation of the filter itself is based on the operation of the global object WP Query of the WordPress core. Study the documentation on using this functionality in more detail. https://developer.wordpress.org/reference/classes/wp_query/