Support » Plugin: WP-Paginate » How to implement in Twenty Twelve?

Viewing 3 replies - 1 through 3 (of 3 total)
  • I would like to know how to this to. I tried to put the line of code in my template file, and it crashed the site until I took the line of code back out. I don’t see any settings panel in the dashboard or anything, so I don’t know how to do it either.

    I have the same question. Try everything, but without result.

    the plugin gives an example for Twenty Eleven – the coding and procedure is actually very similar for Twenty Twelve;

    if this is not enough info:

    the code for the ‘next/prev posts nav’ is in functions.php of Twenty Twelve;

    function twentytwelve_content_nav( $html_id ) {

    start by creating a child theme of Twenty Twelve;

    then add a functions.php file into the child theme;

    get a copy of the function twentytwelve_content_nav( $html_id ), paste it into functions.php (make sure if the file is new, to have <?php in the first line), and edit it to include the code for the plugin;

    different example:

    function twentytwelve_content_nav( $html_id ) {
    	global $wp_query;
    	$html_id = esc_attr( $html_id );
    	if ( $wp_query->max_num_pages > 1 ) : ?>
    		<nav id="<?php echo $html_id; ?>" class="navigation" role="navigation">
    			<h3 class="assistive-text"><?php _e( 'Post navigation', 'twentytwelve' ); ?></h3>
    <?php if ( function_exists( 'wp_paginate' ) ) {
    } else { ?>
    			<div class="nav-previous alignleft"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentytwelve' ) ); ?></div>
    			<div class="nav-next alignright"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'twentytwelve' ) ); ?></div>
    <?php } ?>
    		</nav><!-- #<?php echo $html_id; ?> .navigation -->
    	<?php endif;

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to implement in Twenty Twelve?’ is closed to new replies.