This plugin adds the functions to display page navigation (pagination) on home and archives (categories, authors, date and so on). You can use lots of parameters, and you can customize pagination flexibly.
Examples
Defualt Setting
Template Tag
<?php if ( function_exists( 'page_navi' ) ) { page_navi(); } ?>
Output sample
`
**Customize sample**<br />
Template Tag<br />
<?php if ( function_exists( 'page_navi' ) ) page_navi( 'items=7&prev_label=Prev&next_label=Next&first_label=First&last_label=Last&show_num=1&num_position=after' ); ?>
Output sample<br />
**CSS Sample**
.page_navi {
text-align: center;
}
.page_navi li {
display: inline;
list-style: none;
}
.page_navi li.current span {
color: #000;
font-weight: bold;
display: inline-block;
padding: 3px 7px;
background: #fee;
border: solid 1px #fcc;
}
.page_navi li a {
color: #333;
padding: 3px 7px;
background: #eee;
display: inline-block;
border: solid 1px #999;
text-decoration: none;
}
.page_navi li a:hover {
color: #f00;
}
.page_navi li.page_nums span {
color: #fff;
padding: 3px 7px;
background: #666;
display: inline-block;
border: solid 1px #333;
}
`
Special Thanks
English Translation:
Odyssey
- Upload Prime Strategy Page Navi plugin folder you downloaded to the plugin directory.
- Go to the plugin menu of Admin, and activate "Prime Strategy Page Navi" plugin.
- Add a template tag "page_navi" to the place where you would like to display page navigation in your theme. See below about parametes you can specify by template tags.
Parameters
items
Number of next/prev nagitaions displayed. This number includes current page, so specify odd if you display same numbers on next and prev navi.
Default: 11
edge_type
How to display next/previous link on first and last pages and link to the first and last pages.
none: links are not displayed, span: page numbers are displayed without link, link: links are displayed
Default: none
show_adjacent
Specify if links to adjacent pages are displayed.
Default: true (displayed)
prev_label
Text of the link to previous page. Default: < (<)
next_label
Text of the link to next page. Default: > (>)
show_boundary
Specify if links to the first and last pages are displayed.
Default: true (displayed)
first_label
Text of the link to the first page.
Default: « («)
last_label
Text of the link to the last page.
Default: » (»)
show_num
Specify if the numbers of current page and all pages are displayed.
Default: false (not displayed)
num_position
Specify where the numbers of current page and all pages are displayed.
Default: before. If you would like to display after navigations, specify "after".
num_format
Format to display cuthe numbers of current page and all pages.
Default: %d/%d (nn/mm)
navi_element
Wrapper element of page navi. You can specify div or nav.
Default: none (no wrapper element)
elm_class
Class of wrapper element, or ul class if no wrapper element.
Default: page_navi
elm_id
Id of wrapper element, or ul id if no wrapper element.
Default: none (no id)
li_class
Class of all lis added to page navi.
Default: none (no class)
current_class
Class specified on li in current page.
Default: current
current_format
Format to display current page text.
Default: %d
class_prefix
Class prefix. This is added to all classes that page navi outputs.
Default: none (no prefix)
indent
Number of tab indent.
Default: 0
echo
Output or not. Default: true (output).
If you specify 0 or false, return values as PHP.