ThemeShaper Forums » Thematic

[closed]

Changing the search box text

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

    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 13 years ago #
  2. amygail
    Member

    That's helpful - thanks!

    Posted 13 years ago #
  3. djm
    Member

    Ah, glad it helped :)

    Posted 13 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 13 years ago #
  5. how about changing the search title?

    Posted 13 years ago #
  6. sp_key
    Member

    djm, where do you put this??

    Posted 13 years ago #
  7. cannobbio
    Member

    sp_key: in your theme's functions.php

    Posted 13 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 12 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 11 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 11 years ago #
  11. how are you adding the form? thematic_search_form() or something else?

    Posted 11 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 11 years ago #
  13. Could someone please tell me how you go about changing the button's text from "Search" to "Go"?

    Many thanks,
    James

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

    http://forums.themeshaper.com/topic/style-search-bar-and-button-change-title-of-widget

    Thanks!

    Posted 11 years ago #
  15. danromanchik
    Member

    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 11 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.