previous_post_link( \'<div class="nav-previous">%link</div>$prevthumbnail\', _x( \'<span class="meta-nav">←</span> %title\', \'Previous post link\', \'THEMENAME\' ) );
next_post_link( \'<div class="nav-next">%link</div>$nextthumbnail\', _x( \'%title <span class="meta-nav">→</span>\', \'Next post link\', \'THEMENAME\' );
在我看来,你似乎把变量
$prevthumbnail
和
$nexxtthumbnail
在单引号内。
按照我刚才所说的,我将尝试以下做法:
previous_post_link( \'<div class="nav-previous">%link</div>\'. $prevthumbnail, _x( \'<span class="meta-nav">←</span> %title\', \'Previous post link\', \'THEMENAME\' ) );
next_post_link( \'<div class="nav-next">%link</div>\' . $nextthumbnail, _x( \'%title <span class="meta-nav">→</span>\', \'Next post link\', \'THEMENAME\' );