Change Search text phrase

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #3399 Reply
    Casey Bennett
    Guest

    I would like to change the text box search display. What file do I need to do that in the Frontier theme? Thanks!

    #3401
    Ron
    Keymaster

    I would like to change the text box search display.

    I don’t get what you mean here. Could you explain a bit more.

    #3417
    Casey Bennett
    Inactive

    Sorry.

    This might not be part of your theme, but when I changed the theme it reverted back to something other than what I had for the search’s textbox phrase. Here is a link to a screenshot. The red circled area is the text I would like to change.

    http://www.thecoilist.com/forumpics/changesearch.jpg

    The word “search” shows up too many times! I’d like to change the text on the button as well now that I think about it.

    #3419
    Ron
    Keymaster

    Yes, that’s not part of the theme. It is part of WordPress’ default widgets. You can still change it though by adding this into a child-theme functions.php

    function change_search_placeholder($text) {
    	return str_replace('placeholder="Search …"', 'placeholder="Search Text"', $text);
    }
    add_filter('get_search_form', 'change_search_placeholder');
    
    function change_search_submit($text) {
    	return str_replace('value="Search"', 'value="Search Now"', $text);
    }
    add_filter('get_search_form', 'change_search_submit');
    

    You can also leave the replacement texts blank (ex. value=””) if you don’t want them to show.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Change Search text phrase
Your information: