Refers only to FiboSearch Pro

Expand shortcodes when indexing

In FiboSearch Pro shortcodes are ignored in the indexing process. It means you have e.g. accordion shortcode in a product description, you will not be able to search for keywords contained in this accordion.

The solution is adding the shortcode to the whitelist. It works for FiboSearch Pro v1.13 or higher. Here is how you can do it. Suppose you use the following shortcode in your product description:


[lightweight-accordion title="Sample title"]
Sample content
[/lightweight-accordion]

You have to apply the following snippet that adds name of your shorcode to the whitelist.

add_filter( 'dgwt/wcas/indexer/allowed_shortcodes', function ( $shortcodes ) {
    $shortcodes[] = 'lightweight-accordion';

    return $shortcodes;
} );

You have two ways to add this code to your theme:

  1. Open the functions.php in your Child Theme and add the code at the end
  2. or install the Code Snippets plugin and apply this code as a snippet