• Resolved mdawg32

    (@mdawg32)


    Your plugin has really been a great addition to our website, so thank you for all your hard work.

    The issue I’m having though is that we have blogs on our site as well as products. Often times in searches the blogs are coming up higher in the results than products.

    We’d like to have products prioritized.

    Is there a way to do that?

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

    (@msaari)

    The easiest way is to get Relevanssi Premium, which has easy-to-use post type weights in the Searching settings.

    In the free version, you need a bit of code in your theme functions.php:

    add_filter( 'relevanssi_match', 'rlv_product_boost' );
    function rlv_product_boost( $match ) {
        $post_type = relevanssi_get_post_type( $match->doc );
        if ( 'product' === $post_type ) {
            $match->weight = $match->weight * 10;
        }
        return $match;
    }

    This should make the products appear higher.

    Thread Starter mdawg32

    (@mdawg32)

    Thank you so much!

    I’ll give that code a try ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Make products higher in search results’ is closed to new replies.