get_job_id(), '_main_image'); $location = get_post_meta($post->ID, '_job_location'); $phone = get_post_meta($post->ID, '_company_phone'); $rating = ''; if (in_array('comments-ratings/comments-ratings.php', apply_filters('active_plugins', get_option('active_plugins')))) { global $pixreviews_plugin; $rating = $pixreviews_plugin->get_average_rating($post->ID); } $gallery_images = $gallery[0]; if($gallery_images[0]){ $attach_id = listable_get_attachment_id_from_url($gallery_images[0]); set_post_thumbnail(get_the_ID(), $attach_id); } if (is_array($phone) && !empty($phone)){ $phone = $phone[0] ? $phone[0] : ''; } if (is_array($location) && !empty($location)) { $location = $location[0] ? $location[0] : ''; } ?>