What the heck is going on, you ask? Say hello to Tersus.

Bare bones? You got it. Tersus is an achingly simple WordPress theme without all the usual cruft. Please pardon the mess. This child theme is still under development.


Archive: July, 2010


How to display total number of Custom Posts on a WordPress site

Based on this quick tip from WPRecipes, I was able to quickly figure out how to count and display the number of Custom Posts (of a particular type) that I had on a site. [sourcecode language=”php”] <?php $numposts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE (post_status = ‘publish’ AND post_type = ‘listing’)"); if (0 < $numposts) … Read the rest of this item

This item was posted by Chris Harrison.