导航d&rsquo的;第二条WorPress 2 按钮

 

导航条在WorPress 2 按钮.
WordPress的编辑为您的文章之间更好的导航.

下面desous第一个例子来分隔我们的WordPress的表单导航菜单.
执行编辑的 single.phptemplate-single.php (根据主题选择这一不同构型).

<div align="left" class="boutonleft"><?php previous_post_link( '%link', '&larr; %title'); ?></div>
<div align="right" class="boutonright"><?php next_post_link( '%link', '%title &rarr;'); ?></div>

 

现在看看如何特殊字符整合 (HTML实体) 在我们的WordPress的文章导航菜单.
以前的文章:

<?php $prevPost = get_previous_post(false);
if($prevPost) {
$args = array(
'posts_per_page' => 1,
'include' => $prevPost->ID
);echo "\t" . '<a rel="prev" href="' . get_permalink($prev_post->ID) . '" title="' . $prev_title. '" class="previous-post"><h4><span class="icone">&larr;</span>PREVIOUS POST</h4></a>' . "\n";
$prevPost = get_posts($args);
foreach ($prevPost as $post) {
setup_postdata($post);
?>
<?php
wp_reset_postdata();
} //end foreach
} // end if
?>

 

 

下一篇文章:

<?php $nextPost = get_next_post(false);
if($nextPost) {
$args = array(
'posts_per_page' => 1,
'include' => $nextPost->ID
);echo "\t" . '<a rel="next" href="' . get_permalink($next_post->ID) . '" title="' . $next_title. '" class="next-post"><h4>NEXT POST<span class="icone">&rarr;</span></h4></a>' . "\n";
$nextPost = get_posts($args);
foreach ($nextPost as $post) {
setup_postdata($post);
?>
<?php
wp_reset_postdata();
} //end foreach
} // end if
?>


[site_reviews_summaryassigned_to=”post_id”]

取消
[site_reviews_formassign_to=”post_id”]
本文评分

[site_reviews display=10assigned_to=”post_id”]

作者: FRENCH接口

发表评论

您的电子邮件地址不会被公开. 必需的地方已做标记 *