下記ページが参考になると思います。
[WordPressの投稿記事「前の記事へ」「次の記事へ」のリンクにサムネイルを付ける方法!](http://wp-technique.com/wordpress-14/)
PHP
1<!--▼ページナビ▼-->
2<?php
3$prevpost = get_adjacent_post(true, '', true); //前の記事
4$nextpost = get_adjacent_post(true, '', false); //次の記事
5 if( $prevpost or $nextpost ){ //前の記事、次の記事いずれか存在しているとき
6?>
7<div class="cat_paging">
8 <?php
9 if ( $prevpost ) { //前の記事が存在しているとき
10 echo '<dl class="alignleft"><dt><a href="' . get_permalink($prevpost->ID) . '"><< 前の記事</a></dt><dd><span class="thumb"><a href="' . get_permalink($prevpost->ID) . '">' . get_the_post_thumbnail($prevpost->ID, 'thumb80') . '</a></span><span class="title"><a href="' . get_permalink($prevpost->ID) . '">' . get_the_title($prevpost->ID) . '</a></span></dd></dl>';
11 } else { //前の記事が存在しないとき
12 echo '<div class="alignleft nopost"><a href="' . network_site_url('../') . '">トップへ戻る</a></div>';
13 }
14 if ( $nextpost ) { //次の記事が存在しているとき
15 echo '<dl class="alignright"><dt><a href="' . get_permalink($nextpost->ID) . '">次の記事 >></a></dt><dd><span class="thumb"><a href="' . get_permalink($nextpost->ID) . '">' . get_the_post_thumbnail($nextpost->ID, 'thumb80') . '</a></span><span class="title"><a href="' . get_permalink($nextpost->ID) . '">' . get_the_title($nextpost->ID) . '</a></span></dd></dl>';
16 } else { //次の記事が存在しないとき
17 echo '<div class="alignright nopost"><a href="' . network_site_url('../') . '">トップへ戻る</a></div>';
18 }
19 ?>
20</div>
21<?php } ?>
22<!--▲ページナビ▲-->
サムネイルが不要なら下記の部分を除外してコピペするだけでほぼ目的が達成出来ると思います。
<span class="thumb"><a href="' . get_permalink ~ , 'thumb80') . '</a></span>
慣れないうちはちょっと大変ですが、ぜひ頑張ってください。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2015/12/26 04:06
2015/12/26 06:20