get_comments_number [ WordPress Function ]
get_comments_number ( $post_id = 0 )
| Parameters: |
|
| Uses: | |
| Returns: |
|
| Defined at: |
|
Benzer Fonksiyonlar: comments_number, get_comment_time, get_comment_meta, get_comments_link, get_comments
Retrieve the amount of comments a post has.
Source
<?php
function get_comments_number( $post_id = 0 ) {
$post_id = absint( $post_id );
if ( !$post_id )
$post_id = get_the_ID();
$post = get_post($post_id);
if ( ! isset($post->comment_count) )
$count = 0;
else
$count = $post->comment_count;
return apply_filters('get_comments_number', $count, $post_id);
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- Template Tags/get comments number « WordPress Codex
Description. Retrieves the value of the total number of comments, Trackbacks, and Pingbacks for a post. This tag must be within The Loop.
codex.wordpress.org - get_comments_number Wordpress hook details -- Adam Brown ...
WordPress hook directory get_comments_number. Description. Applied to the comment count read from the $post global variable by the get_comments_number ...
adambrown.info - get_comments_number (WordPress Function) - WPSeek.com
WordPress lookup for get_comments_number, a WordPress Function. wpseek. com is a WordPress-centric search tool for developers and theme authors.
wpseek.com - How to show number of comments in WordPress | Zemalf.com
Mar 6, 2010 ... template tag comments_popup_link, which also links to the comments. template tag comments_number; function: get_comments_number ...
zemalf.com