get_results(“SELECT DISTINCT post_type FROM {$wpdb->posts} WHERE post_type LIKE ‘%task%’ OR post_type LIKE ‘%wppm%’ OR post_type LIKE ‘%project%’ LIMIT 20”);
echo ‘
';
foreach($types as $t) {
echo $t->post_type . " (count: " . $wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->posts} WHERE post_type = '{$t->post_type}'") . ")\n";
}
echo '
‘;
?>