Search-submit text

Hello

I’d like to change the Text of my search-submit button. But i can’t find the file where i could do this. I only added the code to my functions.php of my child-theme:


add_filter('wp_nav_menu_items','add_search_box', 10, 2);
function add_search_box($items, $args) {

        ob_start();
        get_search_form();
        $searchform = ob_get_contents();
        ob_end_clean();

        $items .= '<li>' . $searchform . '</li>';

    return $items;
}

and the following code to my style.css:

input.search-field {
    padding: 0px 0px 0px 5px;
    height: 23px;
    width: 100px;
}

input.search-submit {
    padding: 0px 0px 1px 0px;
    height: 24px;
    width: 60px;
    background: #a37e68 !important;
    border: 2px solid #826453 !important;
}

I am using no searchform.php but i know, that there is a file or a place, where i can change the “search-button”-text because i already changed it once to “suche”.

URL–> wp.weyrauch.ch (search-button is in the top-nav on the right side)

where does the theme (sydney) get the information to show the text “suche” on the search-button?

Hi,

Sydney doesn’t have a searchform.php. This means that searchform.php is pulled from the WP core files so if you want to override it you’d have to create a searchform.php file in your child theme and configure it the way you need. You’ll notice on that link that you can also add a search form directly in your filter, without having to call get_search_form.