More results page problems

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 Ernest Marcinko 7 years, 9 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #8867
    markatwi
    markatwi
    Participant

    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

    #8882
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi 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 :)


    #8883
    markatwi
    markatwi
    Participant

    My 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, 9 months ago by markatwi markatwi.
    #8892
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #8926
    markatwi
    markatwi
    Participant

    Thank 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,
    Mark

    #8929
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi 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 :)


    #8932
    markatwi
    markatwi
    Participant

    Thank you so much! That seems to have fixed it.

    Mark

    #8949
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘More results page problems’ is closed to new replies.