WordPress.org

Support

Support » Themes and Templates » [Resolved] Customizing Search Widget

[Resolved] Customizing Search Widget

  • Is there any way to customized the default WordPress Search Widget?
    i.e.

    • 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

    @emiluzelac

    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=""/>
    </form>
    </div>

    CSS:

    .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

    @emiluzelac

    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,
    Emil

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