Support » Fixing WordPress » find the number of post while using custom query

  • 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

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘find the number of post while using custom query’ is closed to new replies.