toolbox_relevanssi_didyoumean_before

Estimated reading: 1 minute

Sets the text before the relevanssi_didyoumean suggestion. Default value is __( “<p>Did you mean: ” ).

Parameters

  • $string (string)

Usage

Add a filter to change the text before the suggested search, if any.

<?php

add_filter( 'toolbox_relevanssi_didyoumean_before' , 'my_relevanssi_didyoumean_text_before' );

function my_relevanssi_didyoumean_text_before( $string ) {
    $string = '<p>Maybe you could try: ';
    return $string;
}

Note: should you decide to change the surrounding tag (<p> in example), don’t forget to change it in the toolbox_relevanssi_didyoumean_after filter as well.

Share this Doc

toolbox_relevanssi_didyoumean_before

Or copy link

CONTENTS