WordPress.org

Ready to get started?Download WordPress

Forums

How to move page numbers in Twenty Ten theme (4 posts)

  1. patyuen
    Member
    Posted 3 years ago #

    Anyone know how to move the page number from the bottom of the page section to just immediately below the post content? It comes after a bunch of other items and I'm afraid readers may miss it and think there is only one page.

    See this for example.

    http://blog.patyuen.com/2010/09/04/will-removing-craigslist-adult-services/

  2. Josh Betz
    Member
    Posted 3 years ago #

    Move the following code within single.php to where you want the navigation to display.

    <div id="nav-below" class="navigation">
      <div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyten' ) . '</span> %title' ); ?></div>
      <div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentyten' ) . '</span>' ); ?></div>
    </div><!-- #nav-below -->
  3. patyuen
    Member
    Posted 3 years ago #

    The problem is that the code is already as high up as it can go in Single.php. All that stuff between the content and the page nav is being auto generated and inserted into the end of the post.

    <div class="entry-utility">
    						<?php twentyten_posted_in(); ?>
    						<?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?>
    					</div><!-- .entry-utility -->
    				</div><!-- #post-## -->
    
    				<div id="nav-below" class="navigation">
    					<div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyten' ) . '</span> %title' ); ?></div>
    					<div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentyten' ) . '</span>' ); ?></div>
    				</div><!-- #nav-below -->
  4. patyuen
    Member
    Posted 3 years ago #

    For those interested on how I solved this, I moved the page number to the top of the post by moving the page code.

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

Topic Closed

This topic has been closed to new replies.

About this Topic