\WP_Stager_Integration\Component::render_event_featured_image(): void
\WP_Stager_Integration\Component::render_event_featured_image(): voidDescription
Render the event featured image component.
Returns:
void
Information
| File | class-component.php line 53 |
|---|
Full Code
/**
* Render the event featured image component.
*
* @return void
*/
public static function render_event_featured_image() {
// Get data
$event = (array) (Event::get_single_event_data() ?: array());
$featured_image_url = (string) (Event::get_main_image_url( $event ) ?: '');
$featured_image_alt = (string) (Event::get_main_image_alt( $event ) ?: '');
// Render the component
self::render( 'featured-image', 'template-parts/event-page', array(
'url' => $featured_image_url,
'alt' => $featured_image_alt,
) );
}💡 If you ever get stuck or have a question, please check our FAQs, our Free Integration Service, our paid Full Integration Service, or reach out to us!

Get WP Stager Integration
🎁 Limited offer: Use code WELCOME26 to get your first month for free!

