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

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

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1632233
    Dave
    Participant

    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

    #1634618
    Andras
    Keymaster

    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.

    [code language=”php”]// 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>’;
    }[/code]

    Hope this helps.

    Cheers,
    Andras

    #1634621
    Andras
    Keymaster

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

    Like

    [code language=”php”]
    if ( tribe_is_view( ‘list’ ) ) {
    // do something here
    }
    [/code]

    A.

    #1647316
    Support Droid
    Keymaster

    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

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Adding a Community Add event button/link to the Tribe Events Calendar?’ is closed to new replies.