update readme

(fix archive thumbnail function example)
This commit is contained in:
Robin Cornett
2015-04-30 09:58:46 -04:00
parent 580869641f
commit e28c060729
2 changed files with 13 additions and 5 deletions
+6 -2
View File
@@ -186,8 +186,12 @@ _Note:_ because the entry header applies to all posts on a page, such as a blog
Yes! A helper function exists for this, but only runs if you add it. You can easily do this by adding the following to your theme's functions.php file:
```php
if ( class_exists( 'Display_Featured_Image_Genesis' ) ) {
add_action( 'genesis_entry_content', 'display_featured_image_genesis_add_archive_thumbnails', 5 );
add_action( 'genesis_before_entry', 'rgc_add_archive_thumbnails' );
function rgc_add_archive_thumbnails() {
if ( class_exists( 'Display_Featured_Image_Genesis' ) ) {
add_action( 'genesis_entry_content', 'display_featured_image_genesis_add_archive_thumbnails', 5 ); // HTML5 themes
add_action( 'genesis_post_content', 'display_featured_image_genesis_add_archive_thumbnails', 5 ); // XHTML themes
}
}
```