I have a form like this
<form method="get" id="searchform" action="http://domain.com">
<input name="s" id="s" type="text" />
<input type="submit" id="searchsubmit" type="submit" />
</form>
When I add some keyword on search input text, The URL is going as http://domain.com/?s=keyword
I need it as http://domain.com/?s=keyword&post_type=events
Means I need just &post_type=event added on url. How can I do it? any suggestion?
Add a hidden field
Please try this code…
When you press button it return to like.