WordPress search function displaying all my posts (wrong results)
-
I’m trying to include a search bar in my website’s footer using
<?php get_search_form(); ?>Unfortunately, regardless of what keyword I search, all my posts come up in the search results! You can try it here: http://ratanak.org/aatest
The code for my search form is as follows:
<form action="<?php bloginfo('siteurl'); ?>" id="searchform" method="get"> <fieldset> <label for="s" class="screen-reader-text">Search for:</label> <input type="search" id="s" name="s" placeholder="Enter keywords" required /> <input type="image" id="searchsubmit" alt="Search" src="<?php bloginfo( 'template_url' ); ?>/images/searchicon.png" /> </fieldset> </form>Any help to make the search bar actually search my posts and pages would be much appreciated!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘WordPress search function displaying all my posts (wrong results)’ is closed to new replies.