HTML and CSS Reference
In-Depth Information
< footer class =" post-info ">
& lt ; abbr class = "published"
title = " <?php echo ( $comment [ 'date' ]); ?> " & gt ;
<?php echo ( date ( 'd F Y' ,
strtotime ( $comment [ 'date' ]) ) ); ?>
</ abbr >
< address class =" vcard author ">
By < a class =" url fn "
href =" # "> <?php echo ( $comment [ 'comment_author' ]); ?> </ a >
</ address >
</ footer >
< div class =" entry-content ">
< p > <?php echo ( $comment [ 'comment' ]);
?> </ p >
</ div >
</ article ></ li >
<?php
}
?>
& lt ; / ol & gt ;
You'll notice that if the value of $has_comments is true an additional CSS class is applied to the
ordered list called has-comments . This is so we can hide the list item with the "Be the first to
add a comment" message when comments are being displayed using CSS:
#posts-list.has-comments li.no-comments {
display : none ;
}
Now that all this is in place we have a functional blog commenting system. If you would like to
start writing your code from this basic functioning blog commenting system you can also
download the code completed up to here .
12
Search WWH ::




Custom Search