Viewing 4 replies - 16 through 19 (of 19 total)
  • Figured I’d add this. If you want it to show on category pages, you’ll need to edit category.php and edit line 44 the same way index.php was edited in the above post.

    @zeaks – Thanks! Good stuff. You avoided the issue by simply calling a different function name.

    The alternative would be to override the existing function with your own. That way you don’t need an index.php in your child theme just for this. This article does a good job of going over the steps – The Right Way to Override Theme Functions.

    @rohitink – Good article (How To Add Wp-PageNavi To WordPress Twenty Eleven) if you’re editing the parent theme and not creating a child theme. Otherwise, you need to Zeak’s method or you need to override the original theme function as I mention above.

    One other thing – In your article, you state if you “wish to Stylize the Plugin you need to Edit Plugin Files”. That’s actually not the case. You can style them in style.css after disabling ‘Use pagenavi-css.css’ in the plugin’s settings. Here’s example CSS from one of my blogs where I do just this:

    .wp-pagenavi a, .wp-pagenavi a:link, .wp-pagenavi a:active{padding:2px 4px 2px 4px; font-size:12px; margin:2px; text-decoration:none; border:1px solid #666; color:#000; background-color:#fff}
    .wp-pagenavi a:hover{border:1px solid #A90000; font-size:12px; color:#000; background-color:#FFF7D3}
    .wp-pagenavi span.pages{padding:2px 4px 2px 4px; font-size:12px; margin:2px 2px 2px 2px; border:1px solid #CCC; color:#666; background-color:#FFF}
    .wp-pagenavi span.current{padding:2px 4px 2px 4px; font-size:12px; margin:2px; font-weight:bold; border:1px solid #A90000; color:#666; background-color:#FFF7D3}
    .wp-pagenavi span.extend{padding:2px 4px 2px 4px; font-size:12px; margin:2px; border:1px solid #FFF; color:#666; background-color:#FFF}

    @robirizarry I did try to do it that way first, it would be better, but I couldn’t get it to work for me.

Viewing 4 replies - 16 through 19 (of 19 total)
  • The topic ‘How To Add PageNavi to Twenty Eleven WordPress Theme ?’ is closed to new replies.