• Resolved Mikko Saari

    (@msaari)


    The pagination breaks when query variables are involved. For example, a search results page with just a search term paginates correctly, but a search for example.com/?s=ipsum&cat=3 becomes example.com/?s=ipsum&cat=3#038;cat=3&paged=2 in the pagination.

    The problem is in the vantage_pagination() function: it uses a wrong base value for paginate_links():

    echo paginate_links( array(
    'total' => $pages,
    'current' => $paged,
    'mid_size' => $showitems,
    'format' => ( $wp_rewrite->permalink_structure == '' || is_search() ) ? $format_query_string : $format_permalink,
    'base' => get_pagenum_link( false ) . '%_%',
    ) );

    The fix is simple: you need to disable the escaping in get_pagenum_link() with get_pagenum_link( false, false ) – that way the URLs work.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Mikko

    Thanks for your detailed feedback. Alex from SiteOrigin will reply a little later today.

    Cheers
    Andrew

    Hi Mike,

    Thanks for reporting this issue. We’ve decided to remove vantage_pagination in favour of directly using paginate_links. This change will be included in a future Vantage update.

    Kind regards,
    Alex

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.