• Resolved nandomerinowl

    (@nandomerinowl)


    I have integrated this plugin to search for CPT, now I want to use another search engine to search for blog posts, how can I do it?

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

    (@tw2113)

    The BenchPresser

    @nandomerinowl Just realized we missed this thread. Did you ever find a solution for this?

    Thread Starter nandomerinowl

    (@nandomerinowl)

    @tw2113 I never found a solution to this ??

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    I think https://www.algolia.com/doc/api-reference/widgets/configure/js/ may help, but it’s not something we have added to our templates by default.

    For example I configured a default taxonomy category using code like that below.

    let term_data = JSON.parse(queried_terms);
    let item_parts = []
    for ( const item of term_data.terms ) {
    	item_parts.push( 'taxonomies.product_cat:"' + item + '"' );
    }
    let the_query = item_parts.join(' AND ');
    search.addWidgets([
    	instantsearch.widgets.configure({
    		filters: the_query,
    	}),
    ]);
    

    The queried_terms portion came from some inlined data for current WooCommerce category page page.

    I suspect it could be adapted and conditionally set based on post type. Worth tinkering with.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Two different search engines’ is closed to new replies.