ssp_search_index_item

How to use: add_filter()

Included in: Simply Static Pro 1.6.0+

Overview

The ssp_search_index_item filter lets you modify the data stored for each index item within the search integration. Need to add some custom data? That's the filter to be used.

Example

The following code snippet adds a prefix to the search item title:

add_filter('ssp_search_index_item', function(  $item, $dom ) {
    // Modify the data stored for each index item.
    $item['title'] = 'Some title prefix - ' . $item['title'];

    return $item;
});