Support » Fixing WordPress » Displaying Total Number of Post Page Links

  • Hey guys.. i needed your help .. I want to display the total number of pages inside a post.. I dont want to list post pages link like 1,2,3,4..
    I want to display it as like this, <previous 2 of 23 Next>
    Please if you know how to do this, help me out.. Thanks ..

Viewing 7 replies - 1 through 7 (of 7 total)
  • what theme do you use?

    twenty ten .. thats wordpress default theme..

    In single.php, replace:

    <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>


    global $page, $pages;
    wp_link_pages( array( 'before' => '<div class="page-link">', 'after' => '', 'previouspagelink' => '< previous', 'nextpagelink' => '', 'next_or_number' => 'next' ) ); 
    echo( $page.' of '.count($pages) );
    wp_link_pages( array( 'before' => '', 'after' => '</div>', 'previouspagelink' => '', 'nextpagelink' => 'next >', 'next_or_number' => 'next' ) ); 

    Thank u sooo much Jackson 🙂
    It works perfect 🙂 Thanks again.. 🙂 🙂 God bless

    Thanks a lot jackson.
    You helped me out a lot

    I don’t really see a proper place to ask this question, so here goes…

    On Monday, I viewed my web site and everything was fine; on Tuesday when I tried to view my site, everything was gone.

    I have 0 pages, 0 posts, but I have all of the headings where the page content is supposed to be.

    All 80 posts and page content is missing.

    Where I work, I know we back everything up on the server nightly. Does Aweber do the same, and can they restore my site?

    Can i get the link to your website ? May be I can try figuring out if the contents are really deleted or there’s just some coding error..

    Meanwhile, i think your theme might have been messed up, try changing your website theme & see if its all there..

    alternatively, u can view the wordpress database & explore it.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Displaying Total Number of Post Page Links’ is closed to new replies.