Button for Users to Add Events

Home Forums Calendar Products Events Calendar PRO Button for Users to Add Events

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1453259
    Marsha Roscoe
    Participant

    If I am on a listing page showing events for a particular category, how can I display a button on this page to allow users to submit an event? For example, on this page I have a button to allow users to submit events: https://www.lss-elca.org/congregations/. How can I add that same button to this page: https://www.lss-elca.org/events/category/community/list or even this page https://www.lss-elca.org/events/category/community/?

    Thanks!

    #1454489
    Sky
    Keymaster

    Hi Marsha!

    I would be happy to help you figure this out.

    To add content such as a button to a particular view, you need to copy the original template from the plugin into your theme or child theme where you can modify it. See our Themer’s Guide for more information.

    As far as targeting specific categories: There are not separate templates for categories, so you would need to add some conditional statements around your custom content within the template view you want to edit. For example, to add the button within the list view, you would copy and modify /list/content.php. However, I am unsure which conditionals will allow you to target a specific category. I have asked some of the more knowledgeable members of our support team about this, and I will follow up tomorrow after I’ve heard back.

    Thank you for your patience.
    Sky

    #1455610
    Sky
    Keymaster

    Marsha,

    I was able to find the correct conditional function thanks to one of my awesome coworkers.

    To check if a certain category is selected before outputting markup into the template, you can use the following function:

    has_term( 'your-category-slug', 'tribe_events_cat')

    As an example if you wanted to output a message only when viewing events with the category “my-event-category”, you could do something like this:


    This is the best category in the world!

    ";
    } else {
    echo "

    This category is ok I guess.

    ";
    }
    ?>

    Let me know if this helps!

    Thanks,
    Sky

    #1475541
    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 ‘Button for Users to Add Events’ is closed to new replies.