A hook to add custom link in events calendar page

Home Forums Calendar Products Events Calendar PRO A hook to add custom link in events calendar page

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1591767
    Linards
    Participant

    Is it possible to add a custom link or content somewhere inside the Events calendar (not a PRO version) page container? Maybe a hook to add a link/extra button below calendar container?

    Thanks

    #1593155
    Sky
    Keymaster

    Hi there,

    Thanks for reaching out. I’d be happy to help with your question.

    It is indeed possible to add content within the calendar output. All of our plugins use a templating system that makes it easy to customize specific views. To create a custom template, you simply copy the original template file from the plugin into your child theme in a “tribe-events” folder, and the custom template will be used in place of the original.

    You can find out more information about this process here: https://theeventscalendar.com/knowledgebase/themers-guide/

    We also use WordPress hooks and filters extensively throughout the templates, so it may also be possible to add content from your functions.php file.

    If you can provide a detailed description and/or a screenshot of where you would like to add your custom content, I will help you figure out which template or hook you need to accomplish it.

    Thanks,
    Sky

    #1593315
    Linards
    Participant

    Thanks for the reply Sky,

    I would like to hook a custom html link just below ul.tribe-events-sub-nav – the previous-next links. I just need a function to hook the content there and I will style all the CSS myself.

    Regards

    #1593844
    Sky
    Keymaster

    Hi again,

    That element is used on multiple templates, sometimes more than once on the page. Could you be more specific? Are you wanting to add content to the main calendar page or the single event page? If the main calendar page, which view(s) do you want the content to show on? ie, “month” “list” etc.

    Thanks,
    Sky

    #1593851
    Linards
    Participant

    Hi,

    I would like it on all pages where they are displayed. Below the yellow line on the screenshot. https://imgur.com/YkPtTXN

    Regards

    #1593853
    Linards
    Participant

    Preferably on month day and list pages.

    #1594791
    Sky
    Keymaster

    Hi again,

    Thanks for the additional information.

    To output content in that spot on all the main calendar pages, you could use one of the existing action hooks.

    Here is an example to get you started:


    add_action('tribe_events_after_header', 'my_custom_content', 100);
    function my_custom_content() {
    echo "Here is my custom content!";
    }

    Just add that code to your theme/child-theme’s functions.php file and replace the content with what you need.

    Hope that helps! Please let me know if you have additional questions about this.

    Thanks,
    Sky

    #1595361
    Linards
    Participant

    Thanks Sky! This helped me a lot!

    #1596069
    Sky
    Keymaster

    Hello,

    Great! Glad I could help. Please let me know if you have any additional questions about this.

    Thanks,
    Sky

    #1613182
    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 10 posts - 1 through 10 (of 10 total)
  • The topic ‘A hook to add custom link in events calendar page’ is closed to new replies.