ThemeShaper Forums » Thematic

[closed]

remove text from search box?

(13 posts)
  • Started 7 years ago by boris
  • Latest reply from helgatheviking
  • This topic is not resolved

Tags:

  1. Is there a way to remove the text from the search box that says: "to search, type and hit enter"

    Posted 7 years ago #
  2. I did as instructed in that thread but it had no effect... any other ideas or is there an additional step besides adding the code to functions.php? Thanks.

    Posted 7 years ago #
  3. The code from the link above is working. I took a look around your site and noticed you are not correctly using a Thematic child theme. For fun I defaulted to Thematic while not using a child theme and tried the code again, it also worked fine on the parent theme.

    So works for me on a child and parent, there is no other step other than just adding it to the functions.php.

    Posted 7 years ago #
  4. Which site are you looking at? I have many. It is definitely not working. I just added it to another site: stuffsingledudeslike.com - no result. Is it supposed to go before or after ?>

    I don't understand what using or not using a child theme means or how to "use a child theme". At this point I'm not trying to change the theme other than to remove the text. Here's what I pasted:

    //Change search box text
    function childtheme_search_value() {
    return "";
    }
    add_filter('search_field_value', 'childtheme_search_value');

    Thanks.

    Posted 7 years ago #
  5. using a child theme means you aren't making direct changes to thematic. it means that have another theme activated and it pulls whatever you don't specify in your child theme from its parent... in this case, thematic. the point would be that thematic could be updated and you wouldn't lose your modifications.

    some of the snippets are getting outdated, but the premise of how to set up your child theme is the same:
    http://www.catswhocode.com/blog/wordpress-how-to-easily-create-a-thematic-child-theme

    there is even a sample child theme folder inside the thematic folder. you just have to upload that to your server and enable it as your theme.

    then add scott's code to your child theme's functions.php

    Posted 7 years ago #
  6. Is there a way to just make this small modification to thematic? It's really the only thing I want to change at the moment. Thanks.

    Posted 7 years ago #
  7. scott said it worked on Thematic so i'd assume you could just put it in functions.php

    however, i'd still recommend just taking the sample child theme out of the thematic folder, uploading and activating that, and then putting the linked code in your new theme's functions.php. (also maybe un-commenting some of the stuff in functions.php) that will be the only change. otherwise everything will still look exactly like thematic. this will set you up nicely for if you want to make other changes in the future.

    Posted 7 years ago #
  8. I did put it in functions.php on two different sites and it did not work. What do you think I have to uncomment?

    Posted 7 years ago #
  9. Can anybody tell me what I have to uncomment to make this work? Thanks.

    Posted 7 years ago #
  10. just moved the thematicsamplechildtheme into my themes folder. activated said theme. pasted:

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

    into my child's functions.php (without touching anything else there) and it works perfectly.
    and the search text changed.

    Posted 7 years ago #
  11. mattweedendesign
    Member

    @Boris, and for the benefit of anyone else:
    I had the same problem - updated my functions.php file, but the search text stayed the same.
    Trouble is, the default value gets saved to the browser's cache, so when you update the code it doesn't always show up right away.
    There's a couple ways to fix this:
    1. Empty your browser cache and reload the page
    2. Hold down shift while you click the refresh button on your browser

    Either way works. Hope this helps someone else!

    Posted 7 years ago #
  12. to add to what matt wrote, also don't forget to turn off any caching plugins such as w3c total cache, wp super cache or any caching services like cloudflare

    Posted 7 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.