A Problem while Searching for Multiple Terms
-
Hey guys.
I have a problem with the search on my website. When I try searching for more than one word the results display, but only for a single page. So let us say, I search for free books and it there are 37 results. The first page displays correctly, but then, if I click page 2, I get a “page not found” error.
After fooling around for a while I found the root of the problem. If I search for multiple terms, let us say “free books”, the first page of the results has an address that looks like this:
http://physicsdatabase.com/?s=free+books
But when I go to page 2, the search terms are joined together as follows:
http://physicsdatabase.com/page/2/?s=freebooks
Attempted Solution
1. Disabled all the plugins to cross out plugin problems
2. Tried a number of search plugins such as Relevanssi, Search Everything and Ajaxy Live.So far nothing helped.
More Info
Theme used: Magazine Basic 2.7.6
Website: http://www.physicsdatabase.com
Some Code:
searchform.php
<form method="get" id="searchform" action="<?php echo home_url(); ?>/"> <div> <input type="text" class="search_input" value="<?php _e('Hit enter to search', "magazine-basic"); ?>" name="s" id="s" onfocus="if (this.value == '<?php _e('Hit enter to search', "magazine-basic"); ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e('Hit enter to search', "magazine-basic"); ?>';}" /> <input type="hidden" id="searchsubmit" /> </div> </form>
I suppose one way to get around this problem would be automatically placing a “+” after each search term, but I have no idea where to put the “+” in the code. Thanks for any kind of help.
- The topic ‘A Problem while Searching for Multiple Terms’ is closed to new replies.