• Resolved Ben

    (@fire4all)


    Hello there,

    i am looking forward to buy your premium-version because i like the way it seemlessly integrates within my page.

    But before i have a serious problem: The URL to the different pages changes :-/
    I have the default sitewidth search like /?s=searchterm and the url for the second page goes to /profile/produkte/?s=searchterm&sf_paged=2

    When i use different searches the url changes – seems like equaly to first result’s url?!

    Examples:
    https://sof.wumgruppe.de/?s=led
    https://sof.wumgruppe.de/?s=profil

    Have you any idea what could went wrong or which variable i need to FIX to the root “./”?

    Would be very nice if you could help me out…

    Best wishes from Germany,
    BennY

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author AlanP57

    (@alanp57)

    It is because the pagination plugin has been written to generate pagination links for blog posts and post comments. The links for search results are different than search results links.

    Thread Starter Ben

    (@fire4all)

    Thanks for your very fast reply – so i need to dive into the code of the plugin and define a fix url base for every pagination-link (like “./”) instead of letting it generate the link-base by whatever way?

    Plugin Author AlanP57

    (@alanp57)

    Looking at the code, it is using the WordPress function get_pagenum_link() at lines 337, 340, 423 and 425 in wp-paginate.php. There is different function that would be used to get links to search pages, get_search_link().

    Thread Starter Ben

    (@fire4all)

    Thank you Alan.

    I worked it out by changing the next/previeous links fixed to:
    $prevlink = “/page/”.($page – 1).”/?s=”.$_GET[‘s’];
    $nextlink = “/page/”.($page + 1).”/?s=”.$_GET[‘s’];

    and withing the paginate_loop() the $output to something like
    <li><a href="/page/$i/?s=".$_GET['s']."' title='$i' class='page'>$i</a></li>

    This works for the normal search-result-page withing wordpress. I am using a hand made search.php, but this also works fine by calling the function manually in the end of the results by wp_paginate().

    Now i just need to figur out, how to disable showing update notices for this plugin to always got this changes stay with me ??

    Plugin Author AlanP57

    (@alanp57)

    Thread Starter Ben

    (@fire4all)

    Perfect.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Search base different from actual url’ is closed to new replies.