Support » Themes and Templates » How to move page numbers in Twenty Ten theme

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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 -->

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

    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(); ?>
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to move page numbers in Twenty Ten theme’ is closed to new replies.