} ?> <main> <?php get_template_part('parts/headers'); if (function_exists('wsuwp_uc_get_object_type_slugs') && in_array(get_post_type(), wsuwp_uc_get_object_type_slugs())) { if ('wsuwp_uc_person' === get_post_type()) { get_template_part('parts/single-layout', 'wsuwp_uc_person'); } else { get_template_part('parts/single-layout', 'university-center'); } } else { if (spine_has_featured_image()) { $featured_image_src = spine_get_featured_image_src(); ?> <figure class="featured-image" style="background-image: url('<?php echo esc_url($featured_image_src); ?> ');"><?php spine_the_featured_image(); ?> </figure><?php } get_template_part('parts/single-layout', get_post_type()); } ?> <footer class="main-footer"> <section class="row halves pager prevnext gutter pad-ends">
/** * Wrapper to determine if the displayed post or page has a featured image assigned. * * We use our `spine_get_featured_image_src()` rather than `has_thumbnail()` as we * want to ensure the source of the image is valid and not empty as a result of a * misplaced media attachment. * * * @return bool True if featured image exists, false if not. */ function spine_has_featured_image() { return spine_get_featured_image_src(); }