Forums Forums Search & Filter Pro Best Way to Work with Large Taxonomy Tree

Viewing 10 posts - 1 through 10 (of 10 total)
  • Anonymous
    #256326

    Hello, I’m struggling to make S&F Pro work with my current architecture.

    I have a rather large category heirarchy (122 items, 3 levels deep).

    I am using Beaver Builder for site design and Beaver Themer for archive pages.

    On the archive page template, I have a S&F shortcode which targets a Beaver Builder post module for the results. The archive works correctly for the posts that should display there, but when I try to filter further with S&F, things break.

    I’m sure this is because of the Results URL under Template Options which is supposed to be set to the target page where the shortcode is displayed.

    However, since this is a dynamic situation where the URL varies depending on the archive, this is not working. Under General Settings, I have “Detect defaults from current page” set for tag/category/taxonomy archives.

    Please tell me there’s a better way than having to build separate S&F search forms for every individual taxonomy.

    Thanks.

    Trevor
    #256372

    I think the first thing to do is see if using our extension for beaver builder will help:

    https://searchandfilter.com/documentation/3rd-party/beaver-builder/

    (there is a download link at the top, which you should be able to see if you are logged in)

    Second, it might be useful for you to send me a live link/URL to your search page.

    Third. Generally, it is not a good idea to have multiple parent/child trees within a single taxonomy (it may be that you have found this to be the case). In relation to our plugin, when designing forms, you can use a data term source only once per form, but you may well want multiple fields, each based on one or other of those parent/child trees. It is much better to split the taxonomy (in your case Category?) up into smaller chunks of terms. This happens a lot on WordPress sites, so there are already some very good tools to make it easier. This post discusses it:

    https://support.searchandfilter.com/forums/topic/elementor-filter-not-working-showing-all-results/#post-221562

    Anonymous
    #256457
    This reply has been marked as private.
    Anonymous
    #256463
    This reply has been marked as private.
    Trevor
    #256489
    This reply has been marked as private.
    Trevor
    #256557

    I think that the issue you are facing is that the Beaver Builder integration requires a fixed results URL. I think we plan to make this more flexible in V3 (due in a few months), but for now, let us take you example.

    You have gone to:

    https://mywebsite.com/nfl/afc/afc-east/

    using the site navigation system. That page should be identical to:

    https://mywebsite.com/nfl/?_sft_category=afc-east

    Is that correct? If it is, then you could use a WordPress re-direct so that when you click on the archive page link, WordPress will rewrite that to the search page equivalent. I haven’t written such a rewrite example in the forum, but I would guess it might look like this:

    function sandf_change_afc_archive_url_rewrite() {
    	if ( is_category() ) {
    		$category = get_category( get_query_var( 'cat' ) );
    		$cat_slug = $category->cat_slug;
    		wp_redirect( home_url( "nfl/?_sft_category=" ) . $cat_slug );
    		exit();
    	}	
    }
    add_action( 'template_redirect', 'sandf_change_afc_archive_url_rewrite' );

    This would go in the child theme functions.php file. WARNING: I HAVE NOT TESTED THIS!

    What do you think? Would this be acceptable to you? If it is, can you try it? Let me know what happens.

    Then, I think if we can resolve that issue, the Beaver Builder issue will need to be taken up by our plugin developer, Ross. But, we can deal with that after this first issue is resolved (at least for now).

    Anonymous
    #256619
    This reply has been marked as private.
    Trevor
    #256621
    This reply has been marked as private.
    Anonymous
    #256627
    This reply has been marked as private.
    Trevor
    #256629

    Understood. Do get back to me and let me know how you get on?

Viewing 10 posts - 1 through 10 (of 10 total)