WordPress.org

Ready to get started?Download WordPress

Forums

Displaying Total Number of Post Page Links (8 posts)

  1. angelforever123
    Member
    Posted 2 years ago #

    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 ..

  2. jadeclubpenguin
    Member
    Posted 2 years ago #

    what theme do you use?

  3. angelforever123
    Member
    Posted 2 years ago #

    twenty ten .. thats wordpress default theme..

  4. Jackson
    Member
    Posted 2 years ago #

    In single.php, replace:

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

    With:

    <?php
    
    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' ) ); 
    
    ?>
  5. angelforever123
    Member
    Posted 2 years ago #

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

  6. sansarsnv
    Member
    Posted 2 years ago #

    Thanks a lot jackson.
    You helped me out a lot

  7. SirTerry
    Member
    Posted 2 years ago #

    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?

  8. angelforever123
    Member
    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags