Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Jonathandejong

    (@jonathandejong)

    Hi Plamenad,

    No the search logic is AND.
    So If you search for term 1 in tax 1 and term 2 in tax 2 the query would look like

    'tax_query' => array(
    	'relation' => 'AND',
    	array(
    		'taxonomy' => 'tax1',
    		'terms' => array('term1')
    	),
    	array(
    		'taxonomy' => 'tax2',
    		'terms' => array('term2')
    	)
    )

    I say *would* look like because the actual query is done entirely by WordPress Core.
    BTF does not create the query itself but rather redirects to custom rewrite urls for core supported queries like posttype/?tax=term&tax2=term2

    However at the moment BTF does not automatically update the dropdowns after a selection has been made (before you hit the filter button) so it’s possible to land on a filter with no results. An update is in the works where I use AJAX to update the dropdowns continually to avoid this.

    If you’re still certain that you’re seeing an OR logic you probably have another plugin that’s messing with it ??

    Thread Starter plamenad

    (@plamenad)

    Hi,
    This sounds great but .. If I have for example 4 posts in category “Test” and only one of them had a taxonomy “english” after filtering the posts by both parameters category “Test” and Taxonomy “english” it shows me all the four posts that are in a category “Test” .. So i guess that maybe the problem is in the taxonomy plugin.. So could you please advice which taxonomy plugin is working well with yours?
    Thank you!

    Plugin Author Jonathandejong

    (@jonathandejong)

    Hi,

    Need a bit more info ??
    1. Are you using a CPT and a Taxonomy (not regular categories)?
    2. Have you activated the CPT in BTF settings?
    3. Do you use any rewrite slug on either the cpt or taxonomy that’s different than the slug you register with (for example registering a cpt “books” giving it a rewrite slug of “book”.

    Thread Starter plamenad

    (@plamenad)

    Hi,
    I am using the regular categories and a taxonomies is that a problem? Should i use the CTP categories instead?
    Also.. Yes I do rewrite slugs of the taxonomy filters..

    Plugin Author Jonathandejong

    (@jonathandejong)

    There’s no support for regular categories in BTF. These have a special rewrite already by WordPress which I have not been able to make work. Spent countless hours.. :/

    So you need to only use CPT and custom taxonomies.
    Also, If you do rewrite slugs you need to make sure the query_var parameter is also set to the same slug.

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