Month Navigation Code

Home Forums Calendar Products Events Calendar PRO Month Navigation Code

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #168603
    displaywizard
    Participant

    Hi,

    I’m trying to change the month navigation code, which is located in /public/template-tags/month.php on lines 225 to 252.

    Is it possible to do this in the themes functions file? As I know if I change the month.php file it will be overridden when I next update the plugin.

    Kind Regards

    Peter Symonds

    #168838
    Casey
    Participant

    Peter,
    Thanks for getting in touch! We definitely discourage users from editing the plugin files directly because of the reason you mentioned above. You’ll notice that almost all of our functions are filterable, so you should be able to modify the output of the function by using the filters that we’ve provided. If you look at ‘tribe_events_the_previous_month_link()’ you’ll notice that there’s an ‘apply_filters’ reference at the very end of the function. This is so that you can write some code to customize the output if you’d like.

    Pasting something like this into your theme’s functions.php file will get you started: https://gist.github.com/ckpicker/4d570fb29217df9ca603

    Of course, you’ll have to write all of the logic to parse the HTML string and modify as needed, but that should get you started in the right direction. Good luck, and let me know if you have further questions! 🙂

    -Casey-

    #168968
    displaywizard
    Participant

    Thank you very much, all sorted now!

    Great support!

    #170317
    Casey
    Participant

    Excellent! Thanks for the kind words, and thanks for confirming that this got you sorted. Since it looks like you’re all set, I’m going to mark this thread “Answered” and close it out.

    By the way, if you have a minute or two, we would love it if you’d write a few words for us here: http://m.tri.be/jw

    Thanks in advance. 🙂

    Cheers,
    Casey

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Month Navigation Code’ is closed to new replies.