mirror of
https://github.com/10h30/display-featured-image-genesis.git
synced 2026-07-11 18:46:03 +09:00
update readme
(fix archive thumbnail function example)
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user