Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › More results page problems
This topic contains 7 replies, has 2 voices, and was last updated by Ernest Marcinko 7 years, 3 months ago.
- AuthorPosts
- June 6, 2016 at 11:04 am #8867
Hi there I want my search to only pull results from one category. I have set up the search to do so and works fine in the ajax search results but when clicking on the “Show more results” page we are given results from all category’s.
So I have amended the show more results url to:
“?s={phrase}&cat=162&”
This works fine until I try to view results on page 2 upwards as the url is changed to ?s=={phrase }&cat=162paged=2 and is missing the & before the ‘paged=2’.
I have changed the site to display 30 results to compensate for the issue but I hope for this to be only a temporary fix.
Any ideas? Thank you, Mark
June 6, 2016 at 2:04 pm #8882Hi Mark,
The more results url is not going to work for sure, it should not end with an “&” sign. WordPress should automatically append the “paged” query variable to the end of the URL.
You should try without the ending “&” sign:
?s={phrase}&cat=162
Unless your current theme theme does some funny stuff, the “&paged=2” should be appended to the end of the url correctly by wordpress pagination.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
June 6, 2016 at 2:29 pm #8883My apologizes, I should have mentioned I added the “&” to the end in an attempt for it to be added to the results page when selecting page 2 upwards.
Setting up the ‘ Show more results..’ url as ?s={phrase}&cat=162 still gives me the same outcome when trying to view further results.
Thank you,
Mark-
This reply was modified 7 years, 3 months ago by
markatwi.
June 7, 2016 at 11:01 am #8892You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
June 9, 2016 at 10:16 am #8926Thank you,
I will take a look into my themes search.php.
Any ideas on what i should be looking for? Sorry if that is to much of a broad question but Im not sure myself.
Thank you,
MarkJune 9, 2016 at 10:41 am #8929Hi Mark,
I’ve found an older version of the theme you are using on my test servers and I took a quick look. I’m not sure if you are using the same version, but I have found the problem.
Open up the wp-content\themes\wp_oswad_market\framework\functions\pagination.php file, and look for this line (line 86 on my screen):
elseif(strpos($pageLink,'?') >= 0 && strpos($pageLink,'&') === false)
and change that to:
elseif(strpos($pageLink,'?') >= 0)
And that should solve the problem hopefully.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
June 9, 2016 at 1:53 pm #8932Thank you so much! That seems to have fixed it.
Mark
June 10, 2016 at 7:34 am #8949You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
-
This reply was modified 7 years, 3 months ago by
- AuthorPosts
The topic ‘More results page problems’ is closed to new replies.