• Hi

    I am using the below to display the number of posts in the current category

    <?php echo $wp_query->found_posts; ?>

    It works fine when a user is logged in but when not logged in it doesnt include the post_status private only publish.

    Is there a way to also include private via an array?

    Thanks

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘$wp_query->found_posts’ is closed to new replies.