Last active
May 9, 2019 10:46
-
-
Save wplit/cee1588f9a1c812c155940c4d036bd59 to your computer and use it in GitHub Desktop.
search form for custom post type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form role="search" method="get" id="searchform" class="searchform" action="https://yoursite.com/"> | |
<div> | |
<label class="screen-reader-text" for="s">Search for:</label> | |
<input type="text" value="" name="s" id="s"> | |
<input type="hidden" value="product" name="post_type" /> | |
<input type="submit" id="searchsubmit" value="Search"> | |
</div> | |
</form> |
it's the same html as normal Oxygen component puts out, just added line 5
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Put inside code block in the html bit.
Change line 1 to include your site URL as action
Change line 5 to include your post type as value (replace 'product')