Friday, July 23, 2010
Trick for displaying Number of Comments in your WordPress Blog
Place below code where you want to display your comment count:
<?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";
?>
Subscribe to:
Posts (Atom)
Popular Posts
-
Some times when you connect to the webhost via FileZilla you may encounter this error message. "421 Sorry, cleartext sessions are ...
-
Q: Can I start my own company on oDesk? A: Yes! oDesk allows you to build and manage a team of workers, colleagues and collaborators. Yo...
-
Most of the readers are familiar with the International Space Station or "ISS" as it’s often referred to. But just in case you ...
-
Step 1 Download below JS file and replace your print.button.js with below it, https://github.com/aravindnc/Buttons/blob/repeating-print-...
-
Do you want to send an email anonymously because, for example, you fear your views might not be appreciated by your boss? There are various ...
-
In Joomla most probably after upgradation users will encounter an error, that is they cannot edit articles or sections. You can fix this b...
-
Are you a stock trader looking to learn and earn? Look no further than NSE Trading Alerts, the ultimate resource for trading setups and idea...
-
In Magento, we can add tags for a product using the steps below. Create a tag from here : Catalog->All Tags-> Add New Tag. Aft...
-
DivX Crawler is the first and most reliable source for Direct Download Movies, Software and Music Videos. Username : divx273 Password : 8...
-
Now i'm telling you on how to add a rich text editor inside a Text/HTML widget in a Wordpress Admin Panel - Widget Area. Here we are usi...