Skip to Content
WordPress® All-in-One For Dummies®
book

WordPress® All-in-One For Dummies®

by Lisa Sabin-Wilson, Cory Miller, Kevin Palmer, Andrea Rennick, Michael Torbert
April 2011
Beginner to intermediate content levelBeginner to intermediate
908 pages
22h 37m
English
For Dummies
Content preview from WordPress® All-in-One For Dummies®

WP-Page Navi

In order to create page navigation links underneath your blog posts and archive listings for sites that have numbered pages, you need to install this WP-Page Navi plugin (http://wordpress.org/extend/plugins/wp-pagenavi). (See the settings in Figure 5-4.) This plugin provides a better user experience for your readers by making it easier for them to navigate through your content, and allowing search engines to easily go through your Web page and index your pages and posts. After you install and activate the plugin, you need to insert the following code into your Main Index template (index.php):

<?php wp_pagenavi(); ?>

image The wp_pagenavi(); template tag needs to be added on a line directly after The Loop. Please go to Book VI, Chapter 3 for extensive discussion of The Loop in the Main Index template file to find out where, exactly, you need to add this line of code.

Installing this code gives you the lower navigation. You can experiment with where you want to place the wp_pagenavi() code in your template file to give you the type and look and feel you want. Additionally, you can control the look of the plugin by providing styling in your CSS (style.css) theme file for the WP-PageNavi plugin display, or you can have the plugin insert it's default CSS into your regular CSS by unchecking the Use Pagenavi.css? option.

Figure 5-4: WP-Page Navi settings.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

WordPress® 24-Hour Trainer

WordPress® 24-Hour Trainer

George Plumley
Gaming Hacks

Gaming Hacks

Simon Carless

Publisher Resources

ISBN: 9780470877012Purchase book