コード例 #1
0
'); }</style><?php 
}
?>

<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">
コード例 #2
0
/**
 * Add excerpt style in classes to article on list views.
 *
 * @param array $classes List of classes to be added to the article element.
 *
 * @return array Modified list of classes.
 */
function spine_excerpt_style_classes($classes)
{
    global $post;
    if (!is_singular()) {
        if ($post->post_excerpt) {
            $classes[] = "summary-excerpted";
        } elseif (strstr($post->post_content, '<!--more-->')) {
            $classes[] = "summary-divided";
        } elseif ('excerpt' === spine_get_option('archive_content_display')) {
            $classes[] = "summary-truncated";
        } else {
            $classes[] = "summary-unabridged";
        }
        if (spine_has_background_image()) {
            $classes[] = 'has-background-image';
        }
        if (spine_has_featured_image()) {
            $classes[] = 'has-featured-image';
        }
        if (spine_has_thumbnail_image()) {
            $classes[] = 'has-thumbnail-image';
        }
    }
    return $classes;
}