Issues with Filters

This topic contains 14 replies, has 2 voices, and was last updated by JValens98 JValens98 1 year, 3 months ago.

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #40279
    JValens98
    JValens98
    Participant

    Hello,

    We kindly ask your assistance with the following:

    1. Once a child category is flagged, no related results.
    Ex. YEAR CYCLE / Pesach –
    Results are not about Pesach topic.
    https://emor.emorproject.org/gateways-to-torat-hayim/

    2. We applied filters on two pages. Each page has its own content. However when applying filters to one page, both the pages’ contents are involved. We need to keep the content separate: each page with its own content.

    https://emor.emorproject.org/gateways-to-torat-hayim/
    https://emor.emorproject.org/welcoming-shabbat/

    Thank you
    Regards,
    Rosa

    #40297
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Rosa,

    1. For this case I may recommend a stronger filtering rule, either one of these two: https://i.imgur.com/j3lrVre.png

    2. The plugin will do a fresh search regardless of the current content on the page. If you wish to restrict the results to a specific category, then I recommend using the inclusion by taxonomy terms options.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #40299
    JValens98
    JValens98
    Participant

    Hi Ernst,

    Thank you for your assistance.

    All the best,
    Rosa

    #40314
    JValens98
    JValens98
    Participant

    Hi Ernest,

    Point 1.

    The collaborators who manage our WP site say that following your indication, we will get this scenario:

    Flagging one Parent and two or more child categories of it, the system will display the posts which belong to both the child categories, as long as these posts have been categorized with both the child categories.
    If the post belongs only to one of the child, it will not be displayed.
    If this is true, is not what we are looking for, usually, posts belong to only one child category.

    Ex
    Parent: YEAR CYCLE
    Child: Pesach + Shavuot

    Result: posts tagged as Pesach + Shavuot at the same time.

    Best Regards,
    Rosa

    #40331
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Rosa,

    The option I suggested will do exactly that: https://i.imgur.com/gM9GtW9.png

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #40354
    JValens98
    JValens98
    Participant

    Hello Ernest,

    About point 1
    You wrote:
    1. For this case I may recommend a stronger filtering rule, either one of these two: https://i.imgur.com/j3lrVre.png

    This has been implemented, however:

    Once we choose a keyword from the filters, we still get contents from both the pages.
    We were told that this is how it works. The system will provide the content related to the specific page only if we select a topic and subtopic on the filters above.
    Is that correct?

    Best Regards,
    Rosa

    #40362
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    I just checked your configuration, but it is not selected. This is your configuration, and this is what I suggest.
    I am looking at the search configuration ID=4 from page: https://emor.emorproject.org/gateways-to-torat-hayim/

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #40379
    JValens98
    JValens98
    Participant

    Hello Ernest,

    My apologies: I previously provided the wrong feedback on this point.
    Here is the correct one.

    I will try to explain again in a more proper way.

    I need the system filtering in the following way:

    Clicking on a Parent Cat ( ex A) + on two or more Child Cat ( ex. A1 and A3)
    We should get:
    all the post which belong to OR to A1 OR to A3 – which should be displayed at the same time.
    This means that each post will be categorized on the back end as A1 OR A3 and NOT as A1 AND A3.
    This is like an e-commerce website where the filter BRANDS will have as its child categories, Samsung, Sony, LG etc.
    I want to be able to select within BRANDS all the items which belong to Samsung and LG –
    Is that doable?

    Thank you
    Best Regards,
    Rosa

    #40459
    JValens98
    JValens98
    Participant
    You cannot access this content.
    #40464
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Rosa,

    Sorry about the late response, I did not forgot your message.

    I had to take a closer look if this is actually possible somehow – but I’m afraid not without major custom coding. This kind of logic would work only if the items were not in the main category as well. The parent “main” category only differs from the other sub-categories by it’s level, otherwise it is a category just like any other.

    So once you select A + A1 with “OR” logic, then items from A3 will also show up, if they are associated with the A category.

    I was looking for a possible way to maybe alter the filters and remove the main category from the query arguments – that could actually solve this, but I don’t know if that is possible without any major changes.

    I will get back to you a bit later, will let you know.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #40471
    JValens98
    JValens98
    Participant
    You cannot access this content.
    #40491
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Unfortunately I am not available for custom jobs, I am sorry.

    I may have found a possible solution though. Please switch to this logic, and then use this custom code too:

    add_filter("asp_query_args", "asp_query_args_exclude_parents", 10, 2);
    function asp_query_args_exclude_parents($args, $search_id) {
    	foreach ( $args['post_tax_filter'] as &$filter ) {
    		foreach ( $filter['include'] as $k => $id ) {
    			$term = get_term($id);
    			$parent = ( isset( $term->parent ) ) ? get_term_by( 'id', $term->parent, $term->taxonomy ) : false;
    			if ( $parent == false ) {
    				unset($filter['include'][$k]);
    			}
    		}
    	}
    	return $args;
    }
    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #40514
    JValens98
    JValens98
    Participant
    You cannot access this content.
    #40517
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    1. In this case I honestly don’t know if there is a way to get this work exactly as that.

    2. You should update the plugin to the latest release first, as you are using a very outdated version. This has been changed in a very recent release, and it may be possible with Elementor Live filters too if this option is enabled.
    Be careful when updating, make a site backup, because your version is 27 patches behind the current release.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #40518
    JValens98
    JValens98
    Participant
    You cannot access this content.
Viewing 15 posts - 1 through 15 (of 15 total)

The topic ‘Issues with Filters’ is closed to new replies.