-
-
Save jazzsequence/0ed45d2b08275427dc00 to your computer and use it in GitHub Desktop.
passes post_type as an array to the query string
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
<?php | |
?> | |
<form action="<?php echo home_url(); ?>" id="topsearchform" method="get"> | |
<fieldset class="topsearchform"> | |
<label for="s" class="screen-reader-text"><?php _e('Search for:', 'curated'); ?></label> | |
<input type="search" id="s" name="s" placeholder="" required /> | |
<input type="hidden" name="post_type[]" value="post" /> | |
<input type="hidden" name="post_type[]" value="song" /> | |
<input type="hidden" name="post_type[]" value="artist" /> | |
<input type="image" id="searchsubmit" alt="<?php _e('Search', 'curated'); ?>" src="<?php echo get_template_directory_uri(); ?>/images/searchicon.png" class="searchicon" /> | |
</fieldset> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this is the search page template that shows these search results https://gist.github.com/jazzsequence/5a2e82f9db8b29366ba3