categoty param in get_posts
-
Hi,
I am having a problem with a simple piece of code and it’s beed troubling me because, as far as i can see, the code is “by the book”.
I am trying to list all posts for a category of a custom post type. When i use the get:posts function for the post type the results are ok, but when i add the category argument it returns an empty array. Has anyone has this issue?
The code is the following:
$args = array(
‘post_type’=>’zen_art_newsletter’,
‘post_status’=>’publish’,
‘orderby’=>’post_date’,
‘order’=>’DESC’,
‘suppress_filters’=>0,
‘category’=>530
);$newsletterPosts = get_posts($args);
Regards and thanks in advance,
Luis Dias
The topic ‘categoty param in get_posts’ is closed to new replies.