// functions.php function wpb_total_posts() { $total = wp_count_posts()->publish; echo $total; }
// Any page or template <?php wpb_total_posts() ?>
// functions.php function wpb_total_posts() { $total = wp_count_posts()->publish; echo $total; }
// Any page or template <?php wpb_total_posts() ?>