Skip to content

Instantly share code, notes, and snippets.

@kirasiris
Created October 12, 2017 08:17
Show Gist options
  • Save kirasiris/3d790d3ae41273eefbc0ace00c3ed83e to your computer and use it in GitHub Desktop.
Save kirasiris/3d790d3ae41273eefbc0ace00c3ed83e to your computer and use it in GitHub Desktop.
<div class="alert alert-info">
<p>
<?php
$numcomms = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '1'");
if (0 < $numcomms) $numcomms = number_format($numcomms); echo "There's <span>".$numcomms."</span> total comments on "; bloginfo('name');
?>
</p>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment