im facing a huge headache cuz in the past 4h i wasn’t able to do a simple thing as
$myposts = get_posts(‘numberposts=5&category=1’);
print_r($my_posts);// returns array();
if i simple remove ‘category’ => 1 it works as is expected…
and yes, category have posts!
i found a lot of people facing this problem but the threads seems to finish with no answer…
no plugins are installed and i have read all the template code and nothing seems to use get_posts or add any filter/change
also, im testing it on default theme
some help is appreciate!
- The topic ‘get_posts() with category filter not working’ is closed to new replies.