Support » Theme: Twenty Eleven » help me to implement wp page number plugin

Viewing 2 replies - 1 through 2 (of 2 total)
  • Michael

    (@alchymyth)

    Forum Moderator

    your linked site is using ‘Slightly’, a theme which is not released under the GPL license, and is therefore not supported by this forum.

    in Twenty Eleven (or rather in the recommended child theme of Twenty Eleven) you would for instance add this edited version of the original code into functions.php of the child theme:

    /**
     * Display navigation to next/previous pages when applicable
     */
    function twentyeleven_content_nav( $nav_id ) {
    	global $wp_query;
    
    	if ( $wp_query->max_num_pages > 1 ) : ?>
    		<nav id="<?php echo $nav_id; ?>">
    			<h3 class="assistive-text"><?php _e( 'Post navigation', 'twentyeleven' ); ?></h3>
    
    <?php if(function_exists('wp_page_numbers')) { wp_page_numbers();
    } else { ?>
    
    			<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'twentyeleven' ) ); ?></div>
    			<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?></div>
    
    <?php } ?>
    		</nav><!-- #nav-above -->
    	<?php endif;
    }

    i migrated from twenty eleven but thanks anyway 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘help me to implement wp page number plugin’ is closed to new replies.