當前位置: 首頁>>代碼示例>>PHP>>正文


PHP the_comments_navigation函數代碼示例

本文整理匯總了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 
    }
    ?>
開發者ID:iq007,項目名稱:MadScape,代碼行數:30,代碼來源:comments.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 
開發者ID:jsfi,項目名稱:website-fraulieblingsbunt,代碼行數:31,代碼來源:comments.php


注:本文中的the_comments_navigation函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。