• Resolved oneruffryder

    (@oneruffryder)


    Hi. How can we add taxonomies on aside. By default there post types, categories but categories are only for the posts.

    Two questions.

    1. Can we list which custom post type we want to show instead of showing all for instant search (without hidding/banning) them. If we can how/where can i list those?

    2. By default categories come. I have cpt’s and taxonomies. When i click on one of the cpt’s taxonomies are not shown as an additional filter. While on posts/categories this happens.
    Talking about #facet-post-types and #facet-categories.

    Taxonomies are indexed. So how can i bring them as well?
    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    For your first question, are you referring to in the results? Or in say the sidebar area with the widgets for refining results?

    2. You can add as many widget filters as you want but you’ll want to override the templates shipped before going too crazy, that way we don’t lose those customizations in future updates. You’ll want to review and perhaps duplicate the widgets that exist in the template, while making sure to edit the attributes parameter.

    For example, I added a refinement list widget for a custom WooCommerce taxonomy with code like the example below:

    instantsearch.widgets.refinementList({
    	container: '#facet-capacity-standard',
    	attribute: 'taxonomies.pa_capacity-standard',
    	operator: 'or',
    	limit: 5,
    	sortBy: ['isRefined:desc', 'count:desc', 'name:asc'],
    	showMore  : true,
    	searchable: true,
    }),
    

    The attribute I got from the indexable attributes in the Algolia dashboard. You will want to make sure any attribute getting added to a given Algolia widget is listed as being facetable in Algolia, and the attributesForFaceting section of your index’ configuration area.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    I believe a list of available widgets for InstantSearch can be found at https://www.algolia.com/doc/api-reference/widgets/js/

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Taxonomies with Categories’ is closed to new replies.