Questo codice mette a video l'icona della busta sia che c'è un commento o no, io vorrei fare in modo che la busta appare solo se c'è almeno un commento
Codice PHP:
if ( ! function_exists( 'donovan_entry_comments' ) ) :
/**
* Displays the post comments
*/
function donovan_entry_comments() {
// Check if comments are open or we have at least one comment.
if ( comments_open() || get_comments_number() ) :
?>
<div class="entry-comments">
<?php
// Display Comments.
echo donovan_get_svg( 'mail' );
comments_popup_link(
esc_html__( 'Leave a comment', 'donovan' ),
esc_html__( 'One comment', 'donovan' ),
esc_html__( '% comments', 'donovan' )
);
?>
</div>
<?php
endif;
}
endif;