Move ticket form from sidebar

Home Forums Ticket Products Event Tickets Plus Move ticket form from sidebar

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1083955
    Matt Gray
    Participant

    Hi,

    I thought this was solved here: https://theeventscalendar.com/support/forums/topic/move-ticket-form-to-list-view/

    But even though the ticket form has moved to the main content and to the single view, it’s still being shown in the sidebar here: http://aquaphysical.mattgraydesign.co.uk/class/cheshire-lido-manchester although I have this in functions.php:

    if( class_exists( 'Tribe__Tickets_Plus__Commerce__WooCommerce__Main' ) ) {
    	remove_action( 'tribe_events_single_event_after_the_meta', array( Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance(), 'front_end_tickets_form', 5) );
    	add_action( 'tribe_events_single_event_after_the_content', array( Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance(), 'front_end_tickets_form') );
    	add_action( 'tribe_events_after_the_content', array( Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance(), 'front_end_tickets_form') );
    }
    

    Surely it should be removed from the sidebar?

    Can you help again please?

    Thanks,
    Matt

    #1084247
    Brian
    Member

    Hi,

    Thanks for using our plugins. I can help out here.

    It looks like the snippet you are using both removes and then adds back the form to the sidebar.

    Does this work better:

    if( class_exists( 'Tribe__Tickets_Plus__Commerce__WooCommerce__Main' ) ) {
    remove_action( 'tribe_events_single_event_after_the_meta', array( Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance(), 'front_end_tickets_form', 5) );
    add_action( 'tribe_events_after_the_content', array( Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance(), 'front_end_tickets_form') );
    }

    #1084279
    Matt Gray
    Participant

    Hey,

    No I’m afraid that’s not quite right… what it’s trying to do is remove it from the sidebar, then add it to the single event page under the content (http://aquaphysical.mattgraydesign.co.uk/class/cheshire-lido-manchester) AND the listing of the events as well (http://aquaphysical.mattgraydesign.co.uk/classes/category/floatfit-classes)

    It currently moves the form to both the correct places, but fails to remove it from the sidebar under the meta…

    Thanks!
    Matt

    #1084335
    Brian
    Member

    Ok thanks

    By default we do not have sidebars for the single events so that is being put there by your theme.

    Have you tried this guide to moving the form:

    https://theeventscalendar.com/knowledgebase/moving-the-ticket-form/

    Maybe you can use that to remove it from the sidebar and leave it in the other two areas.

    #1090325
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Move ticket form from sidebar’ is closed to new replies.