Is there a way to make a category list (like with wp_list_categories) that only displays categories that contains a specific number of posts and beyond?
Is there a way to make a category list (like with wp_list_categories) that only displays categories that contains a specific number of posts and beyond?
Didn't test this much but this would get categories that had more than 7 posts:
<?php
$min_post_cats = $wpdb->get_col("SELECT term_id
FROM $wpdb->term_taxonomy
WHERE taxonomy = 'category'
AND count > 7");
$cats = implode(",", $min_post_cats);
$wlc_param_list='hide_empty=0&show_count=1&title_li=&include=' . $cats;
wp_list_categories($wlc_param_list);
?>This topic has been closed to new replies.