diff --git a/README.md b/README.md index 7b2ce05..e229e8a 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,8 @@ This plugin takes a different approach to how we use and display featured images * display _nothing_ if your featured image is already displayed in your content (the original image, not a resized version). * display a _default featured image_ as a backstretch image if one is uploaded. +__New in 1.3.0:__ optional Genesis archive headlines, descriptions, and excerpts for single posts/pages will display over the backstretch featured image. + __New in 1.2.0:__ on the Media Settings page, you can now upload a _Default Featured Image_ to be used site-wide. This image will be used on any post/page/custom post type which does not have a featured image set, plus archive and taxonomy pages. _Note: This plugin works with the Genesis Framework and child themes only._ @@ -95,12 +97,33 @@ Additionally/alternatively, you could set a max-height for the backstretch image max-height: 700px !important; } ``` + +### I'm using excerpts for a post type/posts/etc, but don't want them to show on the single page, even with the featured image. + +There's a filter for that, too. For example, adding this to your functions.php file would make sure that the excerpt does not show on single posts, or posts from the Staff post type, even if they have an excerpt. + +``` +add_filter( 'display_featured_image_genesis_omit_excerpt', 'rgc_omit_excerpts' ); +function rgc_omit_excerpts( $post_types ) { + $post_types[] = 'staff'; + $post_types[] = 'post'; + + return $post_types; +} +``` + +_Note: styling for the post title with excerpt is styled to be consistent with the optional Genesis taxonomy/author/custom post type archive titles and descriptions. You can override these in your stylesheet._ + ## Credits * Built by [Robin Cornett](http://robincornett.com/) ## Changelog +###1.3.0 +* optional taxonomy/author/CPT headline/description now show over leader image +* optional excerpt displays on single posts/pages as part of overlay; output is the same as taxonomy/author/CPT + ###1.2.2 * default image validation diff --git a/display-featured-image-genesis.php b/display-featured-image-genesis.php index 98e8028..4943fcc 100644 --- a/display-featured-image-genesis.php +++ b/display-featured-image-genesis.php @@ -12,7 +12,7 @@ * Plugin Name: Display Featured Image for Genesis * Plugin URI: http://github.com/robincornett/display-featured-image-genesis/ * Description: This plugin requires the Genesis Framework. It varies the display of the post or page featured image, depending on size. - * Version: 1.2.2 + * Version: 1.3.0 * Author: Robin Cornett * Author URI: http://robincornett.com * License: GPL-2.0+ diff --git a/includes/class-displayfeaturedimagegenesis-common.php b/includes/class-displayfeaturedimagegenesis-common.php index 253813d..78ea5e3 100644 --- a/includes/class-displayfeaturedimagegenesis-common.php +++ b/includes/class-displayfeaturedimagegenesis-common.php @@ -123,4 +123,14 @@ class Display_Featured_Image_Genesis_Common { return apply_filters( 'display_featured_image_genesis_use_default', array( 'attachment', 'revision', 'nav_menu_item' ) ); } + /** + * don't show excerpts even if they exist. + * @return filter creates a new filter for themes/plugins to omit the excerpt on a post type even if an excerpt exists. + * + * @since 1.3.0 + */ + public static function omit_excerpt() { + return apply_filters( 'display_featured_image_genesis_omit_excerpt', array( 'attachment', 'revision', 'nav_menu_item' ) ); + } + } diff --git a/includes/class-displayfeaturedimagegenesis-output.php b/includes/class-displayfeaturedimagegenesis-output.php index c533e1b..5b63174 100644 --- a/includes/class-displayfeaturedimagegenesis-output.php +++ b/includes/class-displayfeaturedimagegenesis-output.php @@ -98,7 +98,16 @@ class Display_Featured_Image_Genesis_Output { echo '
' . __( 'If you would like to use a default image for the featured image, upload it here. Must be a backstretch sized image.', 'display-featured-image-genesis' ) . '
'; + echo '' . sprintf( + __( 'If you would like to use a default image for the featured image, upload it here. Must be at least %1$s pixels wide.', 'display-featured-image-genesis' ), + $item->large+1 + ) . '
'; } /** diff --git a/includes/css/display-featured-image-genesis.css b/includes/css/display-featured-image-genesis.css index ce71d1a..ca4172f 100644 --- a/includes/css/display-featured-image-genesis.css +++ b/includes/css/display-featured-image-genesis.css @@ -14,19 +14,24 @@ position: absolute; } -.big-leader .entry-title { +.big-leader .entry-title.featured-image-overlay { color: #fff; - margin-bottom: 24px; position: relative; text-align: center; } +.big-leader .entry-header, .big-leader .archive-description { background: rgba(255,255,255,.85); color: #333; + margin-bottom: 24px; padding: 24px; } +.big-leader p:last-child { + margin-bottom: 0; +} + img.featured { max-width: 100%; } diff --git a/languages/display-featured-image-genesis.pot b/languages/display-featured-image-genesis.pot index f45d5ac..0a73b4b 100644 --- a/languages/display-featured-image-genesis.pot +++ b/languages/display-featured-image-genesis.pot @@ -4,9 +4,9 @@ # msgid "" msgstr "" -"Project-Id-Version: Display Featured Image for Genesis 1.2.1\n" +"Project-Id-Version: Display Featured Image for Genesis 1.3.0\n" "POT-Creation-Date: 2014-09-17 21:11-0500\n" -"PO-Revision-Date: 2014-10-21 18:03-0500\n" +"PO-Revision-Date: 2014-10-27 17:03-0500\n" "Last-Translator: Robin Cornett