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
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
Did you add
<?php wp_pagenavi(); ?>
somwhere in your theme's footer.php file?
I havent touched even a single file. Used this theme and then added the plugin
Well, you need to add that code to your theme's footer.php file or else the plugin won't show up.
I tried adding it but there isnt any change. Can you give more instructions. Thanks
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?
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>
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>Already tried that. It didnt work
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
hey my friend helped me with it. We have to add the code in the index file. Thanks for all the help :)
Glad you got it sorted out! :)
This topic has been closed to new replies.