WordPress.org

Ready to get started?Download WordPress

Forums

find the number of post while using custom query (2 posts)

  1. Alvaro
    Member
    Posted 2 years ago #

    Hello
    I am using a custom query to return post list .I am trying to find the total number of post returned from the query, I found a property
    found_posts for the work, but it is giving 0 always even though the query is showing post.I found it is an issue with php or to say its a bug.
    The code which i have used is
    echo $wp_query->found_posts;

    Is there any other way to find the total number of post returned by a query i am using wp_query($args)

    Thanks in advance

  2. ted_the_bad
    Member
    Posted 2 years ago #

    I would also like to know how to get this working or what can be used as an alternative!

Topic Closed

This topic has been closed to new replies.

About this Topic