Home Forums Pro Themes Education Hub Pro Search button


Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #26332

    how can I change title of search button? I know how to change text in search form input but I have problem with title of search button.

    Best regards


    Hello @pklima,

    The feature to change the search button text (“Search”) is not directly available in the theme Customizer currently. However, you can modify it with the child theme creation approach.

    To learn more about child themes see the link here : https://codex.wordpress.org/Child_Themes

    To automate the task of child theme creation you can also choose to use plugins like : https://wordpress.org/plugins/wp-child-theme-generator/

    After successful creation and activation of the child theme paste in the following code block in your child theme’s functions.php file :

    function education_hub_customize_search_form() {
    		$search_placeholder = education_hub_get_option( 'search_placeholder' );
    		$form = '<form role="search" method="get" class="search-form" action="' . esc_url( home_url( '/' ) ) . '">
            <span class="screen-reader-text">' . _x( 'Search for:', 'label', 'education-hub' ) . '</span>
            <input type="search" class="search-field" placeholder="' . esc_attr( $search_placeholder ) . '" value="' . get_search_query() . '" name="s" title="' . esc_attr_x( 'Search for:', 'label', 'education-hub' ) . '" />
          <input type="submit" class="search-submit" value="'. esc_attr_x( 'Search', 'submit button', 'education-hub' ) .'" />
    		return $form;

    After you have pasted in the code, find the line containing <input type="submit" class="search-submit" value="'. esc_attr_x( 'Search', 'submit button', 'education-hub' ) .'" /> and replace the word ‘Search’ with your desired text to show on the search button.

    Save your changes and the text will be changed in your website.

    Hope this Helps,

    Best Regards !!

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.