Inserting content to sidebar of Community Add event page

Home Forums Calendar Products Community Events Inserting content to sidebar of Community Add event page

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1250603
    Elizabeth Flagg
    Participant

    Do I need to edit the file directly or is there a hook i can use for functions.php? I’m looking to add an ad rotator to the sidebar of the Community Add form page.
    <?php echo adrotate_group(1); ?>

    #1251003
    Victor
    Keymaster

    Hi Elizabeth!

    Thanks for reaching out to us! 🙂 I am happy to help.

    The Community Events add form does not have a sidebar in it. I assume you are trying to insert that code snippet to the theme template where the “Community Events add form” is displayed.

    First, you will need to find out what Events Template you are using by heading to EventsSettingsDisplay in your site’s wp-admin, and looking for the Events Template option. If you have selected the Default Events Template, the plugin will use the /wp-content/plugins/the-events-calendar/src/views/default-template.php template file for the display.

    All of the other Events Template options depend on the theme you are using. It may be page.php, full-width.php, or other templates your theme may have available.

    In any case, you could do a template override and put that code snippet. We have a great article on how to do that here > https://theeventscalendar.com/knowledgebase/themers-guide/

    Another option, would be to use an action hook like the one you have in /wp-content/plugins/the-events-calendar-community-events/src/views/edit-event.php and add a code like the following in your theme’s functions.php file:

    function insert_adrotate_group () {
    echo echo adrotate_group(1);;
    }
    add_action('tribe_events_community_form_after_template', 'insert_adrotate_group');

    I hope that helps! Let me know if you have other questions.

    Best!

    Victor

    #1262006
    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 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Inserting content to sidebar of Community Add event page’ is closed to new replies.