The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

[resolved] Changing default text on Search button in sidebar (3 posts)

  1. nickharambee
    Posted 4 years ago #


    I am trying to change the default text (value) on the Search button for the default search widget in my sidebar from 'Search' to 'Search Website'. From some googling around it would seem that adding this function to my child theme (of the default Buddypress theme) should do it:

    add_filter('get_search_form', 'new_search_button');
    function new_search_button($text) {
    $text = str_replace('value="Search"', 'value="Searcg Website"', $text);
    return $text;

    However the text doesn't change. Could some help with this?



  2. bcworkz
    Posted 4 years ago #

    If your theme has a searchform.php template, the filter never triggers. In such a case, if you copy the template to your child theme, you can edit it any way you like, and it will be used instead of the parent's template.

  3. nickharambee
    Posted 4 years ago #

    Thanks bcworkz. That sorted it nicely!

Topic Closed

This topic has been closed to new replies.

About this Topic