本文整理汇总了PHP中the_comments_navigation函数的典型用法代码示例。如果您正苦于以下问题:PHP the_comments_navigation函数的具体用法?PHP the_comments_navigation怎么用?PHP the_comments_navigation使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了the_comments_navigation函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: wpex_heading
wpex_heading(array('content' => $comments_title, 'tag' => 'h2', 'classes' => array('comments-title'), 'apply_filters' => 'comments'));
?>
<ol class="comment-list">
<?php
// List comments
wp_list_comments(array('style' => 'ol', 'avatar_size' => 50, 'format' => 'html5'));
?>
</ol><!-- .comment-list -->
<?php
// Display comment navigation - WP 4.4.0
if (function_exists('the_comments_navigation')) {
?>
<?php
the_comments_navigation(array('prev_text' => '<span class="fa fa-angle-left"></span>', 'next_text' => '<span class="fa fa-angle-right"></span>'));
?>
<?php
} elseif (get_comment_pages_count() > 1 && get_option('page_comments')) {
?>
<div class="comment-navigation wpex-clr">
<?php
paginate_comments_links(array('prev_text' => '<span class="fa fa-angle-left"></span>', 'next_text' => '<span class="fa fa-angle-right"></span>'));
?>
</div>
<?php
}
?>
示例2: the_comments_navigation
}
?>
</h2>
<?php
the_comments_navigation();
?>
<ol class="comments__list">
<?php
wp_list_comments(array('style' => 'ol', 'short_ping' => true, 'avatar_size' => 42));
?>
</ol>
<?php
the_comments_navigation();
?>
<?php
}
?>
<?php
// If comments are closed and there are comments, let's leave a little note, shall we?
if (!comments_open() && get_comments_number() && post_type_supports(get_post_type(), 'comments')) {
?>
<p class="no-comments"><?php
_e('Comments are closed.', 'twentysixteen');
?>
</p>
<?php