Custom template tags

Home Forums Calendar Products Events Calendar PRO Custom template tags

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #905228
    Butch Roy
    Participant

    I want to create a template tag for the Week view that counts how many events are in a given day. Where can I declare that function so it is upgrade-proof?

    #905286
    Geoff
    Member

    Hi there, Brian! Thanks for getting in touch.

    Good question. We recommend using template overrides when customizing calendar templates. By placing copies of the templates in your theme (or child theme) folder, you are ensuring that your work will not be overwritten when the plugin is updated.

    The detailed steps for template overrides are outlined in our Themer’s Guide. I’d suggest checking this out to see all the available options you have for customizing the plugin without touching core files.

    Cheers!
    Geoff

    #905340
    Butch Roy
    Participant

    OK if I were to copy the Week template tags file (specifically public/template-tags/week.php) where would I put it in the “tribe-events” folder in my theme?

    Can I declare new template tag functions in my theme’s “functions.php” file?

    #905350
    Geoff
    Member

    Ah, I see what you’re saying. Thanks for clarifying. 🙂

    Yes, it would be better to define those functions on your own in your theme’s functions.php file. Unfortunately, theme overrides are limited to views. which don’t include template tags.

    Cheers!
    Geoff

    #905642
    Geoff
    Member

    Awesome, thanks for following up and marking the answer, Brian!

    I’ll go ahead and close this thread, but please feel free to hit us up with a new thread if any other questions pop up. We’d be happy to help. 🙂

    Cheers!
    Geoff

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Custom template tags’ is closed to new replies.