OwlCyberSecurity - MANAGER
Edit File: single-event.php
<?php if ( !defined( 'ABSPATH' ) ) exit(); get_header( ); $post_ID = get_the_ID(); $product_id = OVAEV_Settings::ovaev_booking_via_woo(); $event_map_address = get_post_meta( $post_ID, 'ovaev_map_address', true ); $event_map_lat = get_post_meta( $post_ID, 'ovaev_map_lat', true ); $event_map_lng = get_post_meta( $post_ID, 'ovaev_map_lng', true ); $event_map_zoom = OVAEV_Settings::event_map_zoom(); $event_name = get_post_meta( $post_ID, 'ovaev_organizer', true); $event_phone = get_post_meta( $post_ID, 'ovaev_phone', true); $event_email = get_post_meta( $post_ID, 'ovaev_email', true); $event_website = get_post_meta( $post_ID, 'ovaev_website', true); $event_gallery = get_post_meta( $post_ID, 'ovaev_gallery_id', true); $event_template = get_post_meta( $post_ID, 'event_template', true ) ? get_post_meta( $post_ID, 'event_template', true ) : 'global' ; $event_booking_via = get_post_meta( $post_ID, 'event_booking_via', true ); $event_booking_links = get_post_meta( $post_ID, 'ovaev_booking_links', true); $sidebar_single = isset( $_GET['show_sidebar_single'] ) ? $_GET['show_sidebar_single'] : OVAEV_Settings::ovaev_show_sidebar_single(); $active_sidebar = 'main-event'; if ( 'yes' === $sidebar_single && is_active_sidebar('event-sidebar') ) { $active_sidebar = 'sidebar-active'; } $template = OVAEV_Settings::ovaev_get_template_single(); ?> <?php if ( 'default' != $template ): ?> <?php if ( 'global' != $event_template ): ?> <?php echo Elementor\Plugin::instance()->frontend->get_builder_content_for_display( $event_template ); ?> <?php else: ?> <?php echo Elementor\Plugin::instance()->frontend->get_builder_content_for_display( $template ); ?> <?php endif; ?> <?php else: ?> <?php if ( 'global' != $event_template ): ?> <?php echo Elementor\Plugin::instance()->frontend->get_builder_content_for_display( $event_template ); ?> <?php else: ?> <div class="single_event"> <div class="container-event"> <div id="<?php echo $active_sidebar; ?>" class="content-event"> <div class="event_intro"> <?php do_action( 'oavev_single_thumbnail' ); ?> <?php do_action( 'ovaev_single_title' ); ?> <div class="wrap-event-info"> <div class="wrap-info"> <?php /** * action oavev_single_time_loc * Hooked oavev_single_time_loc_date * Hooked oavev_single_time_loc_time * Hooked oavev_single_time_loc_location */ do_action( 'oavev_single_time_loc' ); do_action( 'oavev_single_price' ); do_action( 'oavev_single_type' ); ?> </div> <?php if( $product_id != 'default' && $event_booking_via == 'woocommerce' ) { ?> <div class="wrap-booking-links ovaev-booking-via-woo"> <?php do_action( 'oavev_single_booking_cart' ); ?> </div> <?php } else { ?> <?php if( !empty($event_booking_links) && $event_booking_via == 'custom_link' ) { ?> <div class="wrap-booking-links"> <?php do_action( 'oavev_single_booking_links' ); ?> </div> <?php } ?> <?php } ?> </div> <div class="content"> <?php if( have_posts() ) : while( have_posts() ) : the_post(); the_content(); ?> <?php endwhile; endif; wp_reset_postdata(); ?> </div> <?php if( ! empty( $event_map_address ) || ! empty( $event_name ) || ! empty( $event_phone ) || ! empty( $event_email ) || ! empty( $event_website ) || ! empty( $event_gallery ) ) { ?> <div class="tab-Location"> <div class="event_nav event_nav-tabs" role="tablist" aria-label="<?php echo esc_attr('Event Tabs','ovaev');?>"> <?php if( ! empty( $event_map_address ) ) { ?> <button class="event_nav-link" id="ovaev-tab-location" data-href="#location-tab-pane" role="tab" aria-selected="true" aria-controls="location-tab-pane" tabindex="0" > <?php esc_html_e('Location','ovaev')?> </button> <?php } ?> <?php if( ! empty( $event_name ) || ! empty( $event_phone ) || ! empty( $event_email ) || ! empty( $event_website ) ) { ?> <button class="event_nav-link" id="ovaev-tab-contact" data-href="#contact-tab-pane" role="tab" aria-selected="false" aria-controls="contact-tab-pane" tabindex="-1" > <?php esc_html_e('Contact Details','ovaev')?> </button> <?php } ?> <?php if( $event_gallery != '' ){ ?> <button class="event_nav-link" id="ovaev-tab-gallery" data-href="#gallery-tab-pane" role="tab" aria-selected="false" aria-controls="gallery-tab-pane" tabindex="-1" > <?php esc_html_e('Gallery','ovaev')?> </button> <?php } ?> </div> <!-- Tab panes --> <div class="tab-content"> <?php if( ! empty( $event_map_address ) ) { ?> <div role="tabpanel" class="event_tab-pane active" id="location-tab-pane" aria-labelledby="ovaev-tab-location" tabindex="0" style="height: 500px;" data-address="<?php echo esc_attr($event_map_address);?>" data-lat="<?php echo esc_attr($event_map_lat);?>" data-lng="<?php echo esc_attr($event_map_lng);?>" data-zoom="<?php echo esc_attr($event_map_zoom); ?>" ></div> <?php } ?> <?php if( ! empty( $event_name ) || ! empty( $event_phone ) || ! empty( $event_email ) || ! empty( $event_website ) ) { ?> <div role="tabpanel" class="event_tab-pane" id="contact-tab-pane" aria-labelledby="ovaev-tab-contact" tabindex="0"> <div class="event_row"> <div class="col_contact"> <div class="contact"> <ul class="info-contact"> <?php if( $event_name != '' ) : ?> <li> <span><?php esc_html_e('Organizer Name:','ovaev'); ?></span> <span class="info"><?php echo esc_html($event_name); ?></span> </li> <?php endif; ?> <?php if( $event_phone != '') : ?> <li> <span><?php esc_html_e('Phone:','ovaev'); ?></span> <a href="tel:<?php echo esc_attr( $event_phone ) ?>" class="info"><?php echo esc_html($event_phone); ?></a> </li> <?php endif; ?> </ul> </div> </div> <div class="col_contact"> <div class="contact"> <ul class="info-contact"> <?php if( $event_email != '') : ?> <li> <span><?php esc_html_e('Email:','ovaev'); ?></span> <a href="mailto:<?php echo esc_attr( $event_email ) ?>" class="info"><?php echo esc_html($event_email); ?></a> </li> <?php endif; ?> <?php if( $event_website != '') : ?> <li> <span><?php esc_html_e('Website:','ovaev'); ?></span> <a href="<?php echo esc_url( $event_website ) ?>" class="info"><?php echo esc_html($event_website); ?></a> </li> <?php endif; ?> </ul> </div> </div> </div> </div> <?php } ?> <?php if( $event_gallery != '' ) : ?> <div role="tabpanel" class="event_tab-pane" id="gallery-tab-pane" aria-labelledby="ovaev-tab-gallery" tabindex="0"> <div class="event_row"> <?php foreach ( $event_gallery as $items ) { ?> <div class="event_col-6"> <div class="gallery-items"> <?php $img_url = wp_get_attachment_image_url( $items, 'large' ); ?> <a href="<?php echo esc_url($img_url);?>" data-gal="prettyPhoto[gal]"><img src="<?php echo esc_url($img_url);?>" alt="<?php echo get_the_title() ?>" /></a> </div> </div> <?php } ?> </div> </div> <?php endif; ?> </div> </div> <?php } ?> <div class="event_tags_share"> <?php do_action( 'oavev_single_tags' ); ?> <?php do_action( 'oavev_single_share' ); ?> </div> <!-- Navigation --> <?php do_action( 'oavev_single_nav' ); ?> <!-- Related --> <?php do_action( 'oavev_single_related' ); ?> <?php if( comments_open( get_the_ID() ) ) { comments_template(); } ?> </div> </div> <?php if ( 'yes' === $sidebar_single ) { ovaev_get_template( 'sidebar-event.php' ); } ?> </div> </div> <?php endif; ?> <?php endif; ?> <?php get_footer();