Grab posts by multiple categories
You should be able to use this: if (isset($meta_field[‘category’])) { // Get all post data for that category $post_data = get_posts_by_category($meta_field[‘category’], 0, $post_limit); } else { $args = array( ‘numberposts’ => $post_limit, ‘offset’=> 1, ‘category’ => ‘9,3’, ); $post_data = get_posts($args); }