Comments 5Earl D started the conversationJanuary 13, 2021 at 3:54pmis there a way to set any of the images added to an event as a featured image so it is shown when shared to twitter etc? 877Zhivko repliedJanuary 18, 2021 at 3:53pmThat's the default behaviour for facebook share button. For twitter add this function in your theme or child-theme functions.php file: add_filter('stec_get_event_og', function($og, $event, $offset) { $image = ''; if ($event->get_images()) { $images = $event->get_parsed_images(); $image = $images[0]->src; } return array_merge($og, array( 'twitter:card' => 'summary_large_image', 'twitter:title' => $event->get_title(), 'twitter:description' => $event->get_description_short(), 'twitter:image' => $image, )); }, 10, 3); I'll include the twitter og data in the next update. Stachethemes Developer 5Earl D repliedJanuary 18, 2021 at 6:25pmThanks appreciate the response.1 Like Sign in to reply ...
is there a way to set any of the images added to an event as a featured image so it is shown when shared to twitter etc?
That's the default behaviour for facebook share button.
For twitter add this function in your theme or child-theme functions.php file:
I'll include the twitter og data in the next update.
Stachethemes Developer
Thanks appreciate the response.