Help Desk

Adding a Community Add event button/link to the Tribe Events Calendar?

  • Posts: 4 Topics: 5
    | Permalink

    I’ve been trying to find a way to combine the Community add event form with the Tribe Events Calendar. So that when a user visits the calendar anywhere on my site, they will be able to click a button (or a text link) that takes them to the Community Add form.

    I would appreciate any help with this.

    Thanks
    Dave

    Posts: 6978 Topics: 2
    | Permalink

    Hi Dave,

    I see two ways of doing this:

    Either you can add a menu / sub-menu entry that points to ‘http://wcn.spinmodern.co/events/community/add’

    or you can create template overrides or our views and include the url there.

    The first is definitely easier. The amount of work for the second depends on where exactly you want it to show up.

    I just figured a third way. If you copy the following code in your child theme’s functions.php file, then it will add the link at the top and / or bottom of your calendar.

    // This will add it above the calendar
    add_action ( 'tribe_events_before_template', 'add_community_events_link' );
    // This will add it below the calendar
    add_action ( 'tribe_events_after_template', 'add_community_events_link' );
    
    function add_community_events_link() {
    	echo '<a href="http://wcn.spinmodern.co/events/community/add/">Submit an event to the calendar</a>';
    }

    Hope this helps.

    Cheers,
    Andras

    Posts: 6978 Topics: 2
    | Permalink

    If you want to exclude some views, then you can use this function:

    Like

    if ( tribe_is_view( 'list' ) ) {
    // do something here
    }
    

    A.

    Posts: 65
    | Permalink

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

    | Permalink