O'Reilly logo

Bootstrap 4 Site Blueprints by Ian Whitley, David Cochran, Bass Jobsen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Styling the user comments on your pages

WordPress enables your users to comment on your blogs. The JBST theme uses Bootstraps' Media object to display the comments. The media object is an abstract element used as the basis for building more complex and repetitive components. You can use it to style a HTML list too. HTML lists are useful to display comments threads.

In the JBST 4 theme, the comments.php file in the main theme folder contains the HTML and PHP code for the comments. The comments.php file is part of WordPress template system as described before. It contains the following PHP snippet:

<ol class="commentlist"> 
    <?php wp_list_comments
        ('type=comment&callback=jbst4_comments'); ?> 
</ol>

The jbst4_comments callback function to display the comment ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required