Support » Fixing WordPress » How can I remove the total number of pages from paginate links fuction

  • Hi!
    I have added paginate links in the theme’s function, paginate links work accurately but I want to remove the total number of pages from the paginate links,because I don’t want to make everyone aware about total number of pages just by visiting the home page.
    Please could anyone tell me how can I remove total number of pages link from the paginate links?

    For reference, I coding have added:

    <?php
    global $wp_query;
    
    $big = 999999999; // need an unlikely integer
    
    echo paginate_links( array(
    	'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
    	'format' => '?paged=%#%',
    	'current' => max( 1, get_query_var('paged') ),
    	'total' => $wp_query->max_num_pages
    ) );
    ?>

    I have tried to remove the line:
    'total' => $wp_query->max_num_pages
    But this doesn’t work.

    An early reply will be highly appreciable.

  • The topic ‘How can I remove the total number of pages from paginate links fuction’ is closed to new replies.