Search Field in header&footer

Home Forums Icelander Search Field in header&footer

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #21522

    kiwi
    Participant

    Search Field in header&footer

    Resolved

    Hey there! Have you noticed this support service is provided FREE of charge?
    If you like the speed and accuracy of resolutions, please consider supporting me with a small donation. Thank you

    Consider a donation →

    Hi Oliver,

    I’d like to change “Search …” placeholder term in the search field (both header and footer). I couldnt find any way to do this. Can you please help me?

    Thanks you for any help!

    Regards,

    Kaan

    #21524

    Oliver Juhas
    Keymaster

    Hi Kaan,

    This is actually WordPress native functionality, not a theme related one.

    You can change the placeholder text using get_search_form filter hook in functions.php file of your child theme:

    function child_theme_get_search_form( $form ) {
    	$form = preg_replace( '/placeholder="(.*)"/U', 'placeholder="My placeholder here"', $form );
    	return $form;
    }
    add_filter( 'get_search_form', 'child_theme_get_search_form' );

    Or you can try searching for a plugin that allows you to change the WordPress search form.

    Best regards,

    Oliver Juhas
    WebMan Design

    #21526

    kiwi
    Participant

    Thank you so much Oliver. You are the best.

    Best regards

    Kaan

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.