How can I remove the total number of pages from paginate links fuction (1 post)

  1. teraitsolutions
    Posted 2 years ago #

    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:

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 2 years ago by teraitsolutions
  • This topic is not resolved
  • WordPress version: 3.4.2