Modifying WP PageNavi Plugin

November 22, 2007 | By | 1 Reply More

I wanted the navigation elements of WP-Pagenavi to be centered on the page, and the current page number to be above the previous – next navigation, and not have a box around it.

In pagenavi.php, change line 8 from:

echo ‘<span class=”pages”>’.$pages_text.'</span>’;


echo ‘<p class=”pages”>’.$pages_text.'</p>’;

Add the following to pagenavi-css.css:

.wp-pagenavi {
text-align: center;

Change the following lines in pagenavi-css.css from:

.wp-pagenavi span.pages {
padding: 2px 4px 2px 4px;
margin: 2px 2px 2px 2px;
color: #000000;
border: 1px solid #000000;
background-color: #FFFFFF;


.wp-pagenavi p.pages {
padding: 2px 4px 2px 4px;
margin: 2px 4px 6px 2px;
color: #000000;
background-color: #FFFFFF;

You can see it on this web page on the Flora First Christian Church website.

Share this post:


Category: WordPress

Last updated: December 3, 2007

Comments (1)

Trackback URL | Comments RSS Feed

  1. vasil says:

    I just applied it to my website.
    I’m also trying to find how to make page numbers appear in two lines.

Leave a Reply