This must be wrong.
I was testing something so I did:
$queried_post = new WP_Query(array('posts_per_page' => 5, 'offset'=> 1, 'category' => 1));
var_dump($queried_post->has_posts()); exit;
And I get the error:
Fatal error: Call to undefined method WP_Query::has_posts()
I am working with this inside a class INSIDE the theme ….
var_dump($queried_posts);
shows 5-6 posts. even if their were no posts I would get false. I should get …. true ….
It isn’t
has_posts
, it ishave_posts
. You’ve just got the method name wrong. That’s all.http://codex.wordpress.org/Class_Reference/WP_Query#Methods