Support » Plugins » WP-Paginate for twenty twelve, not clear

  • So, I installed the WP-Paginate plugin, the website is a twenty twelve theme. According to the installation instructions, I am supposed to go to the functions and switch: <?php twentytwelve_content_nav( ‘nav-below’ ); ?>

    To: <?php if(function_exists(‘wp_paginate’)) {
    wp_paginate();
    }
    else {
    twentytwelve_content_nav( ‘nav-below’ );
    }
    ?>

    However, when I go into the functions to locate these lines of code in the theme, I find this (I started one line back):

    }
    add_action( ‘widgets_init’, ‘twentytwelve_widgets_init’ );

    if ( ! function_exists( ‘twentytwelve_content_nav’ ) ) :
    /**
    * Displays navigation to next/previous pages when applicable.
    *
    * @since Twenty Twelve 1.0
    */
    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>
    <div class=”nav-previous”><?php next_posts_link( __( ‘<span class=”meta-nav”>←</span> Older posts’, ‘twentytwelve’ ) ); ?></div>
    <div class=”nav-next”><?php previous_posts_link( __( ‘Newer posts <span class=”meta-nav”>→</span>’, ‘twentytwelve’ ) ); ?></div>
    </nav><!– #<?php echo $html_id; ?> .navigation –>
    <?php endif;
    }
    endif;

    I can’t figure out exactly where to add this, I can’t see the:

    <?php twentytwelve_content_nav( ‘nav-below’ ); ?>

    that it refers to in the installation instructions, am I missing something. Is there a different line that I should be replacing. I go to this section by going to “Theme Templates” and clicking on the “Theme Functions/ functions.php”.

    Any clarification would be awesome!!

  • The topic ‘WP-Paginate for twenty twelve, not clear’ is closed to new replies.