Support » Themes and Templates » Customizing Search Widget

  • Resolved czone


    Is there any way to customized the default WordPress Search Widget?

    • Replacing the submit button with Image.
    • Setting the Char. width and Max Char for the TextBox.
    • Adding CSS Style to TextBox.

      I believe many WordPress users including me would like to find a solution for this, any help would really be a great favor.
      Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • Emil Uzelac


    Theme Review Admin

    You should have searchform.php in your theme, if you don’t have one go ahead and create it.

    Basic styles:

    <div class="search-box">
    <form method="get" id="searchform" action="<?php echo home_url() ; ?>/">
    <input type="text" value="<?php echo esc_html($s, 1); ?>" name="s" id="s" maxlength="33" />
    <input type="image" src="<?php bloginfo('template_directory'); ?>/images/button_search.png" class="button" value=""/>


    .search-box input {
    	color: #999;
    	font-family: Arial, Helvetica, sans-serif;
    	font-size: 11px;
    	width: 170px;

    That would be good start.



    Thanks Emil Uzelac,
    Problem solved

    Emil Uzelac


    Theme Review Admin

    you’re very welcome, if this was all for the topic, please help the community and click on resolved from your end.

    Enjoy WordPress,

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Customizing Search Widget’ is closed to new replies.