WordPress.org

Ready to get started?Download WordPress

Forums

WP-PageNavi
Installing on twentyeleven (6 posts)

  1. DustinRyan
    Member
    Posted 1 year ago #

    How can I install this on twentyeleven? I do not see a loop.php file, but I don't see any of the code that needs to be changed located in any other file, either.

    Are the directions just not updated for twentyeleven? I see only twentyten is mentioned in the installation instructions.

    http://wordpress.org/extend/plugins/wp-pagenavi/

  2. jonas12
    Member
    Posted 1 year ago #

    The code that needs changing in twentyeleven is in the functions.php file. that's the only difference.

  3. DustinRyan
    Member
    Posted 1 year ago #

    Ok and can you tell me what the specific lines of code are that need to be changed? I'm relatively unfamiliar with the code structure of WordPress. Saying the specific text that needs to be replaced would be helpful rather than just saying the "code block" of a line of text that has multiple mentions in the functions.php file. So I know which one of these to edit, or if I need to edit all of them. The instructions are fairly vague.

  4. alchymyth
    Forum Moderator
    Posted 1 year ago #

    are you working with a child theme? http://codex.wordpress.org/Child_Themes

    if not, strongly consider to create a child theme before you continue with customisations.

    in a child theme, add this to functions.php:
    (or edit the corresponding section in functions.php of Twenty Eleven to look like the code below)

    function twentyeleven_content_nav( $html_id ) {
    	global $wp_query;
    
    	if ( $wp_query->max_num_pages > 1 ) : ?>
    		<nav id="<?php echo esc_attr( $html_id ); ?>">
    			<h3 class="assistive-text"><?php _e( 'Post navigation', 'twentyeleven' ); ?></h3>
    <?php
    if( function_exists('wp_pagenavi') ) : wp_pagenavi(); else :
    ?>
    			<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentyeleven' ) ); ?></div>
    			<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?></div>
    <?php
    endif; //ends check of wp_pagenavi//
    ?>
    		</nav><!-- #nav-above -->
    	<?php endif;
    }
  5. DustinRyan
    Member
    Posted 1 year ago #

    No I'm not working with a child theme. I created a directory alongside existing themes based on twentyeleven.

    I just need to know specifically what lines of code need to be edited in functions.php instead of a vague general area.

  6. alchymyth
    Forum Moderator
    Posted 1 year ago #

    I just need to know specifically what lines of code need to be edited in functions.php instead of a vague general area.

    that is the exact section.

    if you need anything more specific, consider to hire somebody http://jobs.wordpress.net/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.