Forums Forums Search & Filter Pro PAGINATION: &sf_paged=%#% doesn't add to URL

Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Anonymous
    #38791

    Hi everybody,

    I’ve set the code here below to have pagination in a custom search result page (search-games.php).
    I can see the pagination links but all pointing to the first page. Looking at the URL I’ve seen that the “&sf_paged=%#%” it’s not added.

    Is there a way to solve the problem?

    Thanks for your help.
    Ronny

    — PAGINATION CODE —
    global $wp_query;
    $total = $wp_query->max_num_pages;
    if ( $total > 1 ) {
    // get the current page
    if ( !$current_page = get_query_var(‘paged’) )
    $current_page = 1;
    // structure of “format” depends on whether we’re using pretty permalinks
    if( get_option(‘permalink_structure’) ) {
    $format = ‘&sf_paged=%#%’;
    } else {
    $format = ‘page/%#%/’;
    }
    echo paginate_links(array(
    ‘base’ => get_pagenum_link(1) . ‘%_%’,
    ‘format’ => $format,
    ‘current’ => $current_page,
    ‘total’ => $total,
    ‘mid_size’ => 4,
    ‘type’ => ‘list’,
    ‘prev_text’ => __(‘«’),
    ‘next_text’ => __(‘»’),
    ));
    }

    Ross Moderator
    #38919

    Hey Ronny

    Just had someone with the same issue, can you try my suggestions from:

    https://support.searchandfilter.com/forums/topic/pagination-problems/#post-38913

    First, just for testing, can you disable ajax?

    Then check pagination again, does it work?

    If not, there can sometimes be an issue with pagination.

    There are several WP functions for getting pagination, so if one is not working, its worth trying another – in case there is a conflict with something in your setup.

    Can you tell me, under the “display results” tab, what “display method” are you using?

    Can you test out the other WP pagination functions?

    the_posts_pagination
    next_posts_link | previous_posts_link

    Thanks

    Anonymous
    #39013

    Hi Ross,

    I’ve tried changing the WP pagination function and now is all working.

    Thanks.
    Ronny

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