Event Time

This topic contains 6 replies, has 2 voices, and was last updated by  Sacha Walser 7 years, 2 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #367621

    Sacha Walser
    Expired Member
    Post count: 6

    Hello, on my Events page, the date shows in the sidebar. I would like it to show on the event tab – or any tab, so that I can use the sidebar for other things. How can I move this field? Thanks!

    #367638

    Kor
    Moderator
    Post count: 16516

    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();
        }
    }
    #367815

    Sacha Walser
    Expired Member
    Post count: 6

    Thank you for the quick reply Kor and for the snippet! I added the snippet and received this message:

    The snippet has been deactivated due to an error on line 8:
    syntax error, unexpected ‘}’

    Next move? Thx!

    #367840

    Kor
    Moderator
    Post count: 16516

    Hi sacha,

    Please share WP temp admin access to your site so we can take a better look. You can post the details here using the private reply option below.

    #367868

    Sacha Walser
    Expired Member
    Post count: 6
    This reply has been marked as private.
    #367914

    Kor
    Moderator
    Post count: 16516
    This reply has been marked as private.
    #368181

    Sacha Walser
    Expired Member
    Post count: 6
    This reply has been marked as private.
Viewing 7 posts - 1 through 7 (of 7 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket