Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function check_featured_image(){
- global $post;
- $featured_image = tribe_event_featured_image($post->ID);
- if($featured_image){
- return $featured_image;
- }else{
- set_post_thumbnail( $post->ID, '0000' ); // here the ID of the image that you want to use as default.
- $featured_image = get_the_post_thumbnail($post->ID);
- return $featured_image;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement