Hello I need to have the following code on a specific page:
<div class="searchbar" >
<div class="searchbar-inner" >
search <input type="text" id="search" />
<span class="result-count" ></span>
</div>
</div>
Is it possible that I use a shortcode to place it on the visual editor while editing the page?
Assuming you don’t have the shortcode written down…
Make sure your editor is in the ‘HTML’ mode, and paste the shortcode as ‘search_box’.
Using a shortcode will allow you to reuse this form anywhere you want.
Yes, you can use shortcode, but its not necessary.
You can switch to the HTML tab (next to the visual tab) in the post editor and paste your code there.
Also you should format your search input like the one below if you’re planning to adhere the WordPress search rules.
Cheers,