Forums

[resolved] Problem With WP-PageNavi Plugin On P2 Theme (12 posts)

  1. rahuljrark
    Member
    Posted 1 year ago #

    I am using P2 theme on my blog http://smsoholic.com/ . I have installed the WP-PageNavi plugin, but it doesnt appear on the blog. Can anyone tell me how to add Numbered page Navigation on P2 Theme. Thanks

  2. chellycat
    Administrator
    Posted 1 year ago #

    Did you add

    <?php wp_pagenavi(); ?>

    somwhere in your theme's footer.php file?

  3. rahuljrark
    Member
    Posted 1 year ago #

    I havent touched even a single file. Used this theme and then added the plugin

  4. chellycat
    Administrator
    Posted 1 year ago #

    Well, you need to add that code to your theme's footer.php file or else the plugin won't show up.

  5. rahuljrark
    Member
    Posted 1 year ago #

    I tried adding it but there isnt any change. Can you give more instructions. Thanks

  6. chellycat
    Administrator
    Posted 1 year ago #

    Are you sure the plugin is activated and is showing up in the installed plugins list? What version of WordPress are you using? Is the plugin compatible with the version of WordPress you're using?

    Can you paste the code of your footer.php file here?

  7. rahuljrark
    Member
    Posted 1 year ago #

    Ya, the plugin is there in the list of installed plugins. I am using WP 3.0.1 and the plugin is compatible

    This is the code:

    <?php
    /**
    * @package WordPress
    * @subpackage P2
    */
    ?>
    <div class="clear"></div>

    </div> <!-- // wrapper -->

    <div id="footer">
    <p>
    <?php echo prologue_poweredby_link(); ?>
    <?php printf( __( 'P2 theme by %s.', 'p2' ), 'Automattic' ); ?>
    </p>
    </div>

    <div id="notify"></div>

    <div id="help">
    <dl class="directions">
    <dt>c</dt><dd><?php _e( 'compose new post', 'p2' ); ?></dd>
    <dt>j</dt><dd><?php _e( 'next post/next comment', 'p2' ); ?></dd>
    <dt>k</dt> <dd><?php _e( 'previous post/previous comment', 'p2' ); ?></dd>
    <dt>r</dt> <dd><?php _e( 'reply', 'p2' ); ?></dd>
    <dt>e</dt> <dd><?php _e( 'edit', 'p2' ); ?></dd>
    <dt>o</dt> <dd><?php _e( 'show/hide comments', 'p2' ); ?></dd>
    <dt>t</dt> <dd><?php _e( 'go to top', 'p2' ); ?></dd>
    <dt>l</dt> <dd><?php _e( 'go to login', 'p2' ); ?></dd>
    <dt>h</dt> <dd><?php _e( 'show/hide help', 'p2' ); ?></dd>
    <dt>esc</dt> <dd><?php _e( 'cancel', 'p2' ); ?></dd>
    </dl>
    </div>

    <?php wp_footer(); ?>

    </body>
    </html>

  8. chellycat
    Administrator
    Posted 1 year ago #

    Add this code:

    <?php wp_pagenavi(); ?>

    After <div class="clear"></div>

    So your code would look like this:

    <?php
    /**
    * @package WordPress
    * @subpackage P2
    */
    ?>
    <div class="clear"></div>
    <?php wp_pagenavi(); ?>
    </div> <!-- // wrapper -->
    
    <div id="footer">
    <p>
    <?php echo prologue_poweredby_link(); ?>
    <?php printf( __( 'P2 theme by %s.', 'p2' ), 'Automattic' ); ?>
    </p>
    </div>
    
    <div id="notify"></div>
    
    <div id="help">
    <dl class="directions">
    <dt>c</dt><dd><?php _e( 'compose new post', 'p2' ); ?></dd>
    <dt>j</dt><dd><?php _e( 'next post/next comment', 'p2' ); ?></dd>
    <dt>k</dt> <dd><?php _e( 'previous post/previous comment', 'p2' ); ?></dd>
    <dt>r</dt> <dd><?php _e( 'reply', 'p2' ); ?></dd>
    <dt>e</dt> <dd><?php _e( 'edit', 'p2' ); ?></dd>
    <dt>o</dt> <dd><?php _e( 'show/hide comments', 'p2' ); ?></dd>
    <dt>t</dt> <dd><?php _e( 'go to top', 'p2' ); ?></dd>
    <dt>l</dt> <dd><?php _e( 'go to login', 'p2' ); ?></dd>
    <dt>h</dt> <dd><?php _e( 'show/hide help', 'p2' ); ?></dd>
    <dt>esc</dt> <dd><?php _e( 'cancel', 'p2' ); ?></dd>
    </dl>
    </div>
    
    <?php wp_footer(); ?>
    
    </body>
    </html>
  9. rahuljrark
    Member
    Posted 1 year ago #

    Already tried that. It didnt work

  10. chellycat
    Administrator
    Posted 1 year ago #

    Hmm...some ideas to try:

    1. Did you go to WP-Admin -> Settings -> PageNavi to configure PageNavi? Is there an option to turn it on and off?

    2. Check to see if your theme is using query_posts() correctly: http://scribu.net/wordpress/wp-pagenavi/right-way-to-use-query_posts.html

  11. rahuljrark
    Member
    Posted 1 year ago #

    hey my friend helped me with it. We have to add the code in the index file. Thanks for all the help :)

  12. chellycat
    Administrator
    Posted 1 year ago #

    Glad you got it sorted out! :)

Topic Closed

This topic has been closed to new replies.

About this Topic