Query total number of posts

Using a search filter plugin. I am using to get the total number of posts that exist in the database

 $wp_query->found_posts

However, when a user filters the results on the page, this number changes according to how many posts are shown on the filter.

How could I get the static total number of posts which wouldn’t change irrespective of what the user filters?

Read more here: Query total number of posts

Leave a Reply

Your email address will not be published. Required fields are marked *