-
-
Save robincornett/cd61b7c3742b39bd5f7e to your computer and use it in GitHub Desktop.
add photo to entry content
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'genesis_entry_content', 'rgc_add_photo', 1 ); | |
function rgc_add_photo() { | |
global $post; | |
$name = the_title_attribute( 'echo=0' ); | |
echo get_the_post_thumbnail( $post->ID, 'large', array( 'class' => 'aligncenter', 'title' => $name, 'alt' => $name ) ); | |
} | |
genesis(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment