• Avani C

    (@zalonku)


    Hi there, my results are not showing with filter by “Category” or “Tag”. It’s showing as “Sorry, nothing found. Please try searching again”

    Here is what I have input:
    – Default Search Template
    – Post type: post
    – Taxonomy Fields (1. Category & 2.Post_tag)
    – Relationship between taxonomy “OR”
    – Excluded some terms, dropdown display, Operator “IN”
    – No meta fields enter
    – No String Search

    Am I missing something?

    https://www.ads-software.com/plugins/ultimate-wp-query-search-filter/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author TC.K

    (@wp_dummy)

    Try with one filter first (either category or post tag) to see any problem with the taxonomy.
    Note that your posts must have the category and post tag assigned.

    Also, if you have other search plugin eg relavanssi please disable it.

    Thread Starter Avani C

    (@zalonku)

    Great! After removing “relavanssi” it works.

    Filter only as “Tag” works fine on its own.
    Filter only as “Category” works fine on its own.

    Filter with category & tag, there are a few issues:

    1. Relationship as OR – If I select a “academy” from category and “Select All” for Area, academy in all areas shows and random posts from “giveaway” category also appears. How do I prevent the ‘giveaway’ post from showing up?

    2. Relationship as OR – If I select a “academy” from category and “Central Park Mall” for Area, it’s showing all posts from “academy” & “Central Park Mall” – this is correct because its showing the relationship OR. If I change it to relationship as AND, then no results show at all. (tried Operator as ‘IN’ and ‘AND’, no results)

    Ideally, we want give the users the ability to search services by category (salon, nails, spa) and by tag (neighborhood areas), so the relationship should be ‘AND’, am I correct to say?

    Plugin Author TC.K

    (@wp_dummy)

    Yes, you should use AND.

    Thread Starter Avani C

    (@zalonku)

    When I change relationship to AND, then no results show at all. (tried Operator as ‘IN’ and ‘AND’, no results). Any suggestions?

    Plugin Author TC.K

    (@wp_dummy)

    To understand AND and OR relationship.
    Let say we have posts with following category and tag:

    1. Post 1 – Category : cat 1, Tag : tag 1
    2. Post 2 – Category : cat 2, Tag : tag 2
    3. Post 3 – Category : cat 3, Tag : tag 3
    4. Post 4 – Category : cat 4, Tag : tag 1

    Scenario 1 – User select cat 1 and All tag :

    In OR relationship:
    – All Post 1, 2, 3 and 4 will be found because it will look for posts with cat 1 and also look for posts with Tag regardless what the tag is.
    In AND relationship:
    – All Post 1, 2, 3 and 4 will be found because will look for post with cat 1 AND Tag (regardless what the tag is)

    Scenario 2 – User Select cat 1 and tag 2:

    In OR relationship:
    – Post 1 and 2 will be found, because there are post with cat 1 and also (OR) have post with tag 2.
    In AND relationship:
    – No post will be found, because there are no post that have cat 1 AND tag 2

    Scenario 3 – User Select cat 4 and tag 1:

    In OR relationship:
    – Post 1 and 4 will be found because there are post with cat 4 (Post 4) and also have post with tag 1 (Post 1 and Post 4)
    In AND relationship:
    – Post 4 will be found because on this post have cat 4 AND tag 1.

    From the example above, OR will look for all query term as long as the Category and Tag present in the query.
    Eg: it will look for the post that have A and look for the post that have B.

    And for AND, it will only look for posts that have Category AND Tag that match the query terms.
    Eg: it will look for the post that have A AND B only.

    So, as you can see AND relationship will more accurate result.

    AS for the operator, you can only use AND when the input type is checkbox. Otherwise IN is enough.

    If you cannot get result from AND relationship, then probably your search input doesn’t match the posts. See Scenario 2. You can try Scenario 1 first to see any result found.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Not showing results’ is closed to new replies.