function wpb_total_posts() {
$total = wp_count_posts('trek')->publish;
return $total;
}
add_shortcode('total_posts','wpb_total_posts');
In html
<?php echo do_shortcode('[total_posts]'); ?>
Subscribe to:
Post Comments (Atom)
Featured Post
Make money online
https://www.wpbeginner.com/beginners-guide/make-money-online/?fbclid=IwAR0_9_5aHmbB4rDisaPevdnO4uAgo0N9heHgPu1TjerjurE5ilD2NyzeB2A
Popular Posts
-
function theme_name_excerpt($full_text, $letter_count = 50){ $full_text = trim($full_text); $full_text = strip_tags($full_text);...
No comments:
Post a Comment