Home » » [Web-development (jquery)] Displaying Number of Comments in your WordPress Blog

[Web-development (jquery)] Displaying Number of Comments in your WordPress Blog

Written By Unknown on Sunday 2 August 2015 | 04:51

Displaying Number of Comments in your WordPress BlogDisplaying Number of Comments in your WordPress Blog

<?php
$numcomms = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '1'");
if (0 < $numcomms) $numcomms = number_format($numcomms);
echo "There's ".$numcomms." total comments on my blog";
?>

0 comments:

Post a Comment

 
D.M.C.A Disclaimer - All contents published under GNU General Public License.
We does not upload or host any files on this website.
Copyright © 2015. MAYDANG
Proudly powered by Blogger