Hi sacha,
You can achieve this by using the custom PHP code below. Kindly insert this into the “Code Snippet” plugin.
/* START */
// GeoDirectory: Display event schedule as a tab on event detail page.
function gd_show_event_schedule_as_tab( $template ) {
if ( has_filter( 'geodir_detail_page_sidebar_content', 'geodir_event_detail_page_sitebar_content' ) ) {
remove_filter( 'geodir_detail_page_sidebar_content', 'geodir_event_detail_page_sitebar_content', 2 );
add_filter( 'geodir_detail_page_tab_list_extend', 'gd_detail_page_tab_event_schedule', 10, 1 );
add_action( 'geodir_after_tab_content', 'gd_detail_page_tab_content_event_schedule', 10, 1 );
}
return $template;
}
add_filter( 'template_include', 'gd_show_event_schedule_as_tab', 10 );
function gd_detail_page_tab_event_schedule( $tab_array ) {
if ( 'gd_event' == get_post_type() ) {
$tab_array['event_schedule'] = array(
'heading_text' => __( 'Event Schedule', 'geodirevents' ),
'is_active_tab' => false,
'is_display' => apply_filters( 'geodir_detail_page_tab_is_display', true, 'event_schedule' ),
'tab_content' => ''
);
}
return $tab_array ;
}
function gd_detail_page_tab_content_event_schedule( $tab ) {
if ( $tab == 'event_schedule' ) {
geodir_event_show_shedule_date();
}
}