ThemeShaper Forums » Thematic


Changing the search box text

(15 posts)
  • Started 12 years ago by djm
  • Latest reply from danromanchik
  • This topic is resolved
  1. djm

    I'm just putting this here just in case anyone else is looking for it like I did.

    Changing the default text which gets placed in the search box does not require re-filtering the entire search box wrapper. There's a filter which I couldn't find in the docs and so doing this:

    //Change search box text
    function childtheme_search_value() {
    return "Enter your changed text here..";
    add_filter('search_field_value', 'childtheme_search_value');

    will let you change it whatever you like :)

    Hope that helps someone.

    Posted 12 years ago #
  2. amygail

    That's helpful - thanks!

    Posted 12 years ago #
  3. djm

    Ah, glad it helped :)

    Posted 12 years ago #
  4. And to change the "Search" text on the search button, you can do the same thing with "thematic_search_submit" instead of "search_field_value".

    Posted 11 years ago #
  5. how about changing the search title?

    Posted 11 years ago #
  6. sp_key

    djm, where do you put this??

    Posted 11 years ago #
  7. cannobbio

    sp_key: in your theme's functions.php

    Posted 11 years ago #
  8. A fun way to customize your Internet browsing experience is to change the system font from within the browser's search bar. Text styles, colors and font .

    Posted 11 years ago #
  9. Is there something more to it than this? I added the recommended code to functions.php but the text did not change. Thanks.

    Posted 10 years ago #
  10. This works to change the search box text in thematic's widgetized area

    BUt when I create my own widgetized area (header-aside) this doesn't work - the native search hint still shows. And it doesn't disappear on click.

    Inspecting the element shows the childtheme functions.php is active.

    But it's not being applied to my childtheme widget....

    If you want to see a screenshot showing the problem: Here it is...

    Any advice??

    Posted 9 years ago #
  11. how are you adding the form? thematic_search_form() or something else?

    Posted 9 years ago #
  12. Helga - thank you

    I am using the native 'search' widget and dragging it into the custom header-aside widgetized area.

    And I just discovered that for the change to apply, I have to drag the 'search' widget out of the area and then drag it back in.

    Go figure...

    And thank you again -- I found your functions.php code for changing the search input box size too using functions.php.

    What a gem. The css style option didn't work for my purposes but your code did.

    Thank you - your posts are like little presents..

    Posted 9 years ago #
  13. Could someone please tell me how you go about changing the button's text from "Search" to "Go"?

    Many thanks,

    Posted 9 years ago #
  14. Managed to hash it together from this post...


    Posted 9 years ago #
  15. danromanchik

    OK. I've changed the text for the search box, but how do I style the text? And, can I add an image? The designer wants to add one of those little magnifying glasses to the text box.

    Posted 9 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.