WordPress Search Form

The search box is one part of the important sections that you need to have. In this post, we are going to compose a search form on our website just with some line codes. You can add your custom styles to the search box and put form anywhere. Inside this post, we just use a simple form to get what we mean.

Table of Contents

Search Form Using Code

<form action="clazist.com">
    <input type="text" name="s" placeholder="Search...">
    <input type="submit" value="Search">
</form>

You should replace clazist.com with your website URL. You can use the WordPress function called site_url(). This function returns your site URL like this https://clazist.com.