Top tags with minimum number of posts
I found a solution!: $term_ids = $wpdb->get_col(” SELECT term_id FROM $wpdb->term_taxonomy INNER JOIN $wpdb->term_relationships ON $wpdb->term_taxonomy.term_taxonomy_id=$wpdb->term_relationships.term_taxonomy_id INNER JOIN $wpdb->posts ON $wpdb->posts.ID = $wpdb->term_relationships.object_id WHERE DATE_SUB(CURDATE(), INTERVAL 1 DAY) <= $wpdb->posts.post_date” ); $tags = get_tags(array( ‘orderby’ => ‘count’, ‘order’ => ‘DESC’, ‘number’ => ’10’, // <– maximum number of tags ‘include’ => $term_ids, ‘fields’ => ‘ids’ … Read more