Support » Plugin: Relevanssi - A Better Search » Change the placeholder text for search window

  • Resolved catsfoto1se

    (@catsfoto1se)


    Hi (again)

    Is there anyway to change the placeholder text?
    Now it just says “Search…” I would like to add: “Minimum 3 letters”

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

    (@msaari)

    That would depend on your theme; it’s your theme that prints out the search form, Relevanssi has nothing to do with how the form looks like. If your theme has a searchform.php file, that will be used as a template for the search form.

    Well, I’m using elementor, so I just call [searchform] shortcode on my search page, and I’ll get a little input field and a send button.
    Isn’t that generated by your plugin?

    Plugin Author Mikko Saari

    (@msaari)

    No, that search form is coming either from your theme (in which case it’s defined in searchform.php) or from WordPress.

    If the form is coming from WordPress, this should help, added to your theme functions.php:

    add_filter( 'get_search_form', 'rlv_search_form' );
    function rlv_search_form( $form ) {
        $form = str_replace( 'Search …', 'Search … Minimum 3 letters', $form );
        return $form;
    }

    Hey it worked!
    Thx a lot!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Change the placeholder text for search window’ is closed to new replies.