Hi,
I can get the number of all post on the site, when I used that code:
<?php
$post_number = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish'");
if (0 < $post_number) $post_number = number_format($post_number);
?><?php echo "$post_number"; ?>
What code I have to use, if I want to get the number of posts in selected category? Selected by name od ID of some category ...
Any help will be greatly appreciated.
Best regards, amistad18.