toolbox_relevanssi_didyoumean_n

Estimated reading: 1 minute

Sets the max number of results that trigger a relevanssi_didyoumean suggestion. The default value for this filter is 5. When you leave this filter at it’s default value the suggestions are only displayed when five or less results are found.

Parameters

  • $n (integer)

Usage

Add a filter to change the max number of results that trigger a suggesion, if any.

<?php

add_filter( 'toolbox_relevanssi_didyoumean_n' , 'my_relevanssi_didyoumean_n' );

function my_relevanssi_didyoumean_n( $n ) {
    $n = 10;
    return $n;
}
Share this Doc

toolbox_relevanssi_didyoumean_n

Or copy link

CONTENTS