WordPress.org

Forums

[resolved] WP PageNavi (4 posts)

  1. tachb
    Member
    Posted 2 years ago #

    Hi, I am trying to figure out how to get this plugin to work. I know nothing about code and can't figure out which code to replace with the plugin code. I am using blue lucas theme.

    Here is what my navigation code looks like I have tried deleting different parts and none worked.

    </div>

    <?php endwhile; else: ?>

    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p><?php endif; ?>
    <p><?php posts_nav_link(' — ', __('« Previous Page'), __('Next Page »')); ?></p>

    </div>
    Also not sure if I should put it in index, header or both?
    Not sure what I am doing wrong any help is appreciated. Thanks.

  2. Pioneer Valley Web Design
    Member
    Posted 2 years ago #

    It needs to be used in each Page Template...(which works quite well in Child Theme) These typically include Archive.php, Category.php....more...

    This is well documented at the plugin Author's site.

  3. alchymyth
    Forum Moderator
    Posted 2 years ago #

    try and change what you posted to:

    </div>
    
    <?php endwhile; else: ?>
    
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p><?php endif; ?>
    <p><?php if( function_exists('wp_pagenavi') ) { wp_pagenavi(); }  else { posts_nav_link(' — ', __('« Previous Page'), __('Next Page »')); } ?></p>
    
    </div>
  4. tachb
    Member
    Posted 2 years ago #

    Worked perfectly. Thanks so much! :-)

Topic Closed

This topic has been closed to new replies.

About this Topic