How to make wordpress Dynamic Search-Bar from Predesigned Static Html Search-Bar?

Yes, it’s pretty easy to make our static HTML Search-Bar dynamic.

First, wrap up our <input />tag with <form> </form> tag mentioning action="" and mehotd=""

Second, identify the default key of wordpress and assign it in name="" attribute of input tag.

To be specific, the code would be like this:

<form method="GET" action="<?php bloginfo('home'); ?>">
    <input name="s"placeholder="Search..." />
     <input type="submit" value="Submit">
</form>

How to identify: we may use <?php get_search_form(); ?> in header.php (just for a temporary test) to get the default search-bar of wordpress so that we can search any word in it. Let, we search with a word (post) written in search bar. Then we will get the result with all post words written, if we look at the address bar we are supposed to see like this: your_website.com/?s=new

So, s & new is the key/value pair identified.

Hope it helps.