diff --git a/inc/jetpack.php b/inc/jetpack.php index fda2615b..172afb81 100644 --- a/inc/jetpack.php +++ b/inc/jetpack.php @@ -27,7 +27,7 @@ function _s_jetpack_setup() { // Add theme support for Content Options. add_theme_support( 'jetpack-content-options', array( - 'post-details' => array( + 'post-details' => array( 'stylesheet' => '_s-style', 'date' => '.posted-on', 'categories' => '.cat-links', @@ -35,6 +35,11 @@ function _s_jetpack_setup() { 'author' => '.byline', 'comment' => '.comments-link', ), + 'featured-images' => array( + 'archive' => true, + 'post' => true, + 'page' => true, + ), ) ); } add_action( 'after_setup_theme', '_s_jetpack_setup' ); diff --git a/inc/template-tags.php b/inc/template-tags.php index e4b9cf02..0ff12f1d 100644 --- a/inc/template-tags.php +++ b/inc/template-tags.php @@ -100,3 +100,36 @@ function _s_entry_footer() { ); } endif; + +if ( ! function_exists( '_s_post_thumbnail' ) ) : +/** + * Displays an optional post thumbnail. + * + * Wraps the post thumbnail in an anchor element on index views, or a div + * element when on single views. + */ +function _s_post_thumbnail() { + if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) { + return; + } + + if ( is_singular() ) : + ?> + +