WP函数--comments_popup_link
<p><?php comments_popup_link( 'No comments yet', '1 comment', '% comments', 'comments-link', 'Comments are off for this post');?></p>
Hides the paragraph element <p></p> that contains the comments_popup_link when comments are deactivated in the Write>Post screen. Good for those who want enable/disable comments post by post. Must be used in the loop.
<?phpif ( comments_open() )?: echo '<p>'; comments_popup_link( 'No comments yet', '1 comment', '% comments', 'comments-link', 'Comments are off for this post'); echo '</p>';endif;?>
comments_popup_link()?is located in?wp-includes/comment-template.php
.
?
?
source: ?http://codex.wordpress.org/Function_Reference/comments_popup_link