So I have a .html page under my Wordpress website and I want to be able to use the search button on the static html page to search the search.php
page, is that possible?
Is this correct? This is located inside my test.html
:
<div class="search_bar-wrapper">
<input type="text" class="search_bar search-input evt-search-input-wp" placeholder="Search"
value="<?php echo get_search_query(true); ?>"/>
<button class="btn-fh btn-secondary search-btn search-btn-overlay">
<i class="custom-icon icon-icon_small_arrow_right"></i>
</button>
<div class="clearInput"><img src="/images/icon_close.svg" alt="" /></div>
</div>
Would I need to point a form="submit"
and action=".."
on the input instead? If so, what would the action need to point too?
search.php
doesn't actually perform a search, all the searching is done and finished long beforesearch.php
is loaded, it just displays the results afterwards. Infact you can have a theme with only anindex.php
template and search will still function