• How can I disable content indexing and use Title indexing only when searching for Products with Woocommerce.

Viewing 1 replies (of 1 total)
  • Plugin Author Mikko Saari

    (@msaari)

    If you only have products, add this to your theme functions.php and reindex:

    add_filter( 'relevanssi_index_content', '__return_false' );

    If you also have other posts, where you want to keep the content, use this:

    add_filter( 'relevanssi_post_content', 'rlv_deindex_product_content', 10, 2 );
    function rlv_deindex_product_content( $content, $post ) {
        if ( 'product' === $post->post_type ) {
            return '';
        }
        return $content;
    }
Viewing 1 replies (of 1 total)

The topic ‘Search Indexing’ is closed to new replies.