Modifying WP PageNavi Plugin

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>’;

to:

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;
}

to:

.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:

Facebooktwittergoogle_pluspinterestlinkedin

One comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.