You can add 'post_status' => 'publish'
in your query to retrieve only objects with status publish , this will work for get_posts
, query_posts
or $wp_query
and to include also custom taxonomies you can use tax_query
in your args list
You can add 'post_status' => 'publish'
in your query to retrieve only objects with status publish , this will work for get_posts
, query_posts
or $wp_query
and to include also custom taxonomies you can use tax_query
in your args list