<?php function post_count() { $post_type = 'unternehmer'; $total = wp_count_posts($post_type)->publish; return $total; } add_shortcode(‘unternehmer_anzahl’,’post_count’);
<?php function post_count() { $post_type = 'unternehmer'; $total = wp_count_posts($post_type)->publish; return $total; } add_shortcode(‘unternehmer_anzahl’,’post_count’);