Divi WordPress Theme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress Duplication when searching &order=desc

Discussion in 'Misc WordPress Requests' started by lizverd, Oct 20, 2017.

  1. lizverd


    Duplication when searching &order=desc, by lizverd

    I took the code here

    global $wp_query;

    $big = 999999999; // need an unlikely integer

    echo paginate_links( array(
    'base' => str_replace( $big, '%#%' ),
    'format' => '?paged=%#%',
    'current' => max( 1, get_query_var('paged') ),
    'total' => $wp_query->max_num_pages
    ) );

    If sort posts by date + in descending order, then at the end is duplicated:

    If remove this
    , esc_url( get_pagenum_link( $big ) )
    then there will be no duplicate

    – how to make sure that there is no duplication of this?
    – and whether it is possible to delete this parameter?
    esc_url( get_pagenum_link( $big ) )
    Is this correct and what does it do?

    Duplication when searching &order=desc

Share This Page

Monarch Social Sharing Plugin