Refers only to FiboSearch Pro

How to search for products by custom taxonomy?

The solution requires custom PHP snippets. To apply it, you have to paste the following code into functions.php in your child theme or use the Code Snippets plugin.

The following example is taken from the Bookstore. Authors of the books are custom taxonomies with the name book_author.

Step 1 – Register your custom taxonomy in FiboSearch

add_filter( 'dgwt/wcas/indexer/taxonomies', function ( $taxonomies ) {
	$taxonomies[] = 'book_author';

	return $taxonomies;
} );

Step 2 – Turn on “Search in authors” in the FiboSearch settings

Go to WooCommerce -> FiboSearch -> Search config (tab). The new checkbox called “Search in authors” should appear under the section “Products search scope”. Check it and save the settings.

Step 3 – Rebuild the search index

After saving the settings, the search index should start rebuilding automatically. Go to WooCommerce -> FiboSearch -> Indexer (tab) , observe the status and wait for finishing.

Step 4 – Let’s see if it works

Check if you can search products by terms from the custom taxonomy.