The Events Calendar
[resolved] Change old calendar years from 5 to 1 year ago? (3 posts)

  1. kingofmycastle
    Posted 4 years ago #

    Hi, loving the plugin :) And appreciating your answers to my questions.

    Just one more quick question. The client is asking that the calendar doesn't page all the way back to 2007. It's a new site and he thinks it will give the wrong impression.

    He doesn't really care about previous events he's listed so is there some variable I can change that will make the minimum year 2011? (i.e. THIS_YEAR - 1, not minus 5?)

    That would be great!


  2. Rob La Gatta
    Modern Tribe Support
    Plugin Author

    Posted 4 years ago #

    Thanks for the words, kingofmycastle. Happy to help. Sounds like you just want to remove old years before 2011...I'd imagine that's doable but am not sure how, myself. Let me get one of our devs to take a look here and chime in with any thoughts they may have that could point you in the right direction. Stay tuned.

  3. Joey Kudish
    Posted 4 years ago #

    Hi kingofmycastles,

    Unfortunately at this time, the only way to modify the dropdown would be to modify one of the plugin's file. We never advocate our users to modify core plugin files that way because it means that your changes will be lost next time you update the plugin and that you'll have to redo them. WIth that in mind, I've logged it as a feature for us to make this into a hookable filter so that the amount of years in the dropdown can be modified in a future version.

    In the mean time, the following code modification should do the trick: https://gist.github.com/1980956. You will be modifying the function on lines 563-573 of /lib/tribe-view-helpers.class.php (in the plugin) - specifically changing line 566.

    Hope that helps

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • The Events Calendar
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic