Created
September 27, 2019 11:43
-
-
Save bigdigital/101f6e50cf16a481abba16d352b87e6d to your computer and use it in GitHub Desktop.
The7 add featured image to the Team post type
This file contains hidden or 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
add_action( 'presscore_before_post_content', function() { | |
global $post; | |
if ( get_post_type() !== 'dt_team' ) { | |
return; | |
} | |
echo '<div class="post-thumbnail">'; | |
$img_args = array( | |
'img_id' => get_post_thumbnail_id(), | |
'class' => 'alignnone', | |
'title' => get_the_title(), | |
'wrap' => '<img %IMG_CLASS% %SRC% %ALT% %SIZE% />', | |
); | |
dt_get_thumb_img( $img_args ); | |
echo '</div>'; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment