Retrieves the amount of comments a post has.
$post = 0
Sortie :
@param int|WP_Post $post Optional. Post ID or WP_Post object. Default is the global `$post`. @return string|int If the post exists, a numeric string representing the number of comments
// Utilisation de la fonction get_comments_number
$result = get_comments_number($post = 0);
if ($result) {
// Votre logique ici
}
Chargement des actualités...