wordpressにページャー追加(プラグイン無し)

WORDPRESSの投稿一覧にプラグイン無しでページャを追加する方法をご紹介いたします。

■themes内にあるfunctions.phpに以下記述

■cssに以下記述

.tablenav {
color: #2583ad;
background:white;
margin: 1em auto;
line-height:2em;
text-align:center;
}

a.page-numbers, .tablenav .current {
color: #00019b;
padding: 2px .4em;
border:solid 1px #ccc;
text-decoration:none;
font-size:smaller;
}

a.page-numbers:hover {
color:white;
background: #328ab2;
}

.tablenav .current {
color: white;
background: #328ab2;
border-color: #328ab2;
font-weight:bold:
}

.tablenav .next, .tablenav .prev {
border:0 none;
background:transparent;
text-decoration:underline;
font-size:smaller;
font-weight:bold;
}

※注意事項

archive.phpに記述しないと正常に動作しない。
page.phpやsingle.phpでは次のページが正しく表示されない

関連記事

  1. Zoomが提供する4プランおすすめと特徴

  2. wordpress サイトマップについて

  3. WORDPRESS プラグインの「Contact Form 7」にパラ…

  4. reCAPTCHA(リキャプチャ)の設定方法 wordpress …