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
* Places the author avatar next to the entry header for feature posts, not teaser posts.
* Includes support for co-authors plus plugin
* Replace the BLOGLOGURL with an actual url to an alternate image
*
* @author Joshua David Nelson, joshuadnelson.com
**/
add_action( 'genesis_entry_header', 'jdn_author_post_avatar', 1 ); // using a priority of 1 to insure it is first, before title
function jdn_author_post_avatar() {
if( is_home() || is_single() ){ // only on blog page and single post pages, not on archives
if( in_array( 'feature', get_post_class( '', get_the_ID() ), true ) || is_single() ) { // only on posts with a 'feature' class
if( !function_exists( 'get_coauthors' ) || ( function_exists( 'get_coauthors' ) && 1 == count( get_coauthors( get_the_id() ) ) ) ) { // if using co-authors and a single author, or if not using co-authors