このプラグインは WordPress の最新3回のメジャーリリースに対してテストされていません。もうメンテナンスやサポートがされていないかもしれず、最新バージョンの WordPress で使用した場合は互換性の問題が発生する可能性があります。

Prime Strategy Page Navi

説明

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.

Defualt Setting
Template Tag

Output sample

<ul class="page_navi">
    <li class="first"><a href="http://www.example.com/">&amp;laquo;</a></li>
    <li class="previous"><a href="http://www.example.com/page/5/">&amp;lt;</a></li>
    <li class="before delta-5 head"><a href="http://www.example.com/">1</a></li>
    <li class="before delta-4"><a href="http://www.example.com/page/2/">2</a></li>
    <li class="before delta-3"><a href="http://www.example.com/page/3/">3</a></li>
    <li class="before delta-2"><a href="http://www.example.com/page/4/">4</a></li>
    <li class="before delta-1"><a href="http://www.example.com/page/5/">5</a></li>
    <li class="current"><span>6</span></li>
    <li class="after delta-1"><a href="http://www.example.com/page/7/">7</a></li>
    <li class="after delta-2"><a href="http://www.example.com/page/8/">8</a></li>
    <li class="after delta-3"><a href="http://www.example.com/page/9/">9</a></li>
    <li class="after delta-4"><a href="http://www.example.com/page/10/">10</a></li>
    <li class="after delta-5 tail"><a href="http://www.example.com/page/11/">11</a></li>
    <li class="next"><a href="http://www.example.com/page/7/">&amp;gt;</a></li>
    <li class="last"><a href="http://www.example.com/page/17/">&amp;raquo;</a></li>
</ul>

Customize sample
Template Tag

Output sample

<ul class="page_navi">
    <li class="first"><a href="http://www.example.com/">First</a></li>
    <li class="previous"><a href="http://www.example.com/page/5/">Prev</a></li>
    <li class="before delta-3 head"><a href="http://www.example.com/page/3/">3</a></li>
    <li class="before delta-2"><a href="http://www.example.com/page/4/">4</a></li>
    <li class="before delta-1"><a href="http://www.example.com/page/5/">5</a></li>
    <li class="current"><span>6</span></li>
    <li class="after delta-1"><a href="http://www.example.com/page/7/">7</a></li>
    <li class="after delta-2"><a href="http://www.example.com/page/8/">8</a></li>
    <li class="after delta-3 tail"><a href="http://www.example.com/page/9/">9</a></li>
    <li class="next"><a href="http://www.example.com/page/7/">Next</a></li>
    <li class="last"><a href="http://www.example.com/page/17/">Last</a></li>
    <li class="page_nums"><span>6/17</span></li>
</ul>

CSS サンプル

.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

英語訳:Odyssey

リンク

PS Taxonomy Expander” makes categories, tags and custom taxonomies more useful.

PS Auto Sitemap” is a plugin automatically generates a site map page from your WordPress site.
It is easy to install for beginners and easy to customize for experts.
It can change the settings of the display of the lists from administration page, several neat CSS skins for the site map tree are prepared.

PS Disable Auto Formatting
Stops the automatic forming and the HTML tag removal in the html mode of WordPress, and generates a natural paragraph and changing line.

CMS service with WordPress” provides you service that uses WordPress as a CMS.

スクリーンショット

  • Output Sample of a page navi(Default)
  • Output Sample of a page navi(Customized)

インストール

  1. プラグインディレクトリにダウンロードしたPrime Strategy Page Naviプラグインフォルダーをアップロードします。
  2. 管理者のプラグインメニューに移動し、 “Prime Strategy Page Navi”プラグインを有効にします。
  3. 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.

パラメーター

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: &lt; (<)

next_label
Text of the link to next page. Default: &gt; (>)

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: &laquo; («)

last_label
Text of the link to the last page.
Default: &raquo; (»)

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.

評価

2019年2月11日
clean and simple on 4.9.9 for newbies: add tag <? page_navi() ?> to see it in action 🙂
2件のレビューをすべて表示

貢献者と開発者

Prime Strategy Page Navi はオープンソースソフトウェアです。以下の人々がこのプラグインに貢献しています。

貢献者

“Prime Strategy Page Navi” をあなたの言語に翻訳しましょう。

開発に興味がありますか ?

コードを閲覧するか、SVN リポジトリをチェックするか、開発ログRSS で購読してみてください。

変更履歴

1.0.3

  • Compatible with WordPress 5.0

1.0.2

  • Compatible with WordPress 3.4

1.0.1

  • Compatible with WordPress 3.3

1.0.0

  • Opening on WordPress Plugin Directory.

0.8.1

  • Fixed the issue that true-values are not handled properly.
  • Added edge_type parameter.

0.8.0

  • Opening to the public.