Customizing the search form/widget
The default “Search” widget allows you to insert a Search box that allows visitors to search your web pages and blog posts.
If you need to customise the look of this search box, OM4 websites can use the [search-form] shortcode.
This shortcode can be used in any page, blog post or sidebar text widget. It can even be used in your site’s custom header text or custom footer text field on the site design screen.
Changing the submit button text
By default the submit button has the word “Search” in it. This can be changed by using the buttontext attribute.
For example,
[search-form buttontext="Go"]
will change the text from “Search” to “Go”:
Adding a default value to the search input field
By default the search input field is empty. This can be changed by using the fieldtext attribute.
For example,
[search-form fieldtext="Enter a search term"]
will produce a search form as follows:
Using an image instead of a text based submit button
By default the submit button is a normal HTML submit button with the word “Search” in it. If you wish to have a fancy looking button, you can use the buttonimage attribute to render the button as an image instead.
For example,
[search-form buttonimage="/wp-content/uploads/btn-search.gif"]
will produce a search form as follows:
A search submit button that has a different hover state
We don’t support image buttons for the search widget that can change when the mouse hovers over the search button.
A nice feature to add for the future, but requires some work to get the effect working properly for main versions of Internet Explorer.
