Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › More results page problems
- This topic has 7 replies, 2 voices, and was last updated 9 years, 12 months ago by
Ernest Marcinko.
-
AuthorPosts
-
June 6, 2016 at 11:04 am #8867
markatwi
ParticipantHi 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 #8882Ernest Marcinko
KeymasterHi 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.
June 6, 2016 at 2:29 pm #8883markatwi
ParticipantMy 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 9 years, 12 months ago by
markatwi.
June 7, 2016 at 11:01 am #8892Ernest Marcinko
KeymasterYou cannot access this content.
June 9, 2016 at 10:16 am #8926markatwi
ParticipantThank 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 #8929Ernest Marcinko
KeymasterHi 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):
[php]elseif(strpos($pageLink,’?’) >= 0 && strpos($pageLink,’&’) === false)[/php]
and change that to:
[php]elseif(strpos($pageLink,’?’) >= 0)[/php]
And that should solve the problem hopefully.
June 9, 2016 at 1:53 pm #8932markatwi
ParticipantThank you so much! That seems to have fixed it.
Mark
June 10, 2016 at 7:34 am #8949Ernest Marcinko
KeymasterYou cannot access this content.
-
This reply was modified 9 years, 12 months ago by
-
AuthorPosts
- The topic ‘More results page problems’ is closed to new replies.