I have a search on the front of wordpress, it needs to be replaced with the second search which searches my gallery. I’ve tried messing with the codes but nothing is working?
Here is the current search form
<form method="get" id="searchbar" action="<?php echo home_url( '/' ); ?>">
<input type="search" name="s" placeholder="search...">
</form>
This is the search i need
<p class="search-box">
<label class="screen-reader-text" for="post-search-input">Search Gallery Posts:</label>
<input type="search" id="post-search-input" name="s" value=""/>
<input type="submit" name="" id="search-submit" class="button" value="Search Gallery Posts"/>
</p>
<input type="hidden" name="post_status" class="post_status_page" value="all"/>
<input type="hidden" name="post_type" class="post_type_page" value="gallery"/>
<input type="hidden" id="_wpnonce" name="_wpnonce" value="386bd8477b"/>
<input type="hidden" name="_wp_http_referer" value="/wp-admin/edit.php?post_type=gallery"/>
<div class="tablenav top">
<table class="wp-list-table widefat fixed posts" cellspacing="0">
<div class="tablenav bottom">
</form>
Looks like you should replace your code:
with this: