I'm trying to put a post counter at the header template:
<h5><?php wp_count_posts('post', '')->publish; ?> uses</h5>
But it doesn't work (Shows only "uses")
I'm trying to put a post counter at the header template:
<h5><?php wp_count_posts('post', '')->publish; ?> uses</h5>
But it doesn't work (Shows only "uses")
try and add an echo to your code; wp_count_posts() only returns the value, but does not put it out:
<h5><?php echo wp_count_posts('post', '')->publish; ?> uses</h5>
http://codex.wordpress.org/Function_Reference/wp_count_posts
Thank you :)
It works!
This topic has been closed to new replies.