Title: Custom year filter
Last modified: October 28, 2025

---

# Custom year filter

 *  Resolved [yarnlore](https://wordpress.org/support/users/yarnlore/)
 * (@yarnlore)
 * [5 months, 3 weeks ago](https://wordpress.org/support/topic/custom-year-filter/)
 * I’m looking for a way to create a custom year filter like how this filters hours
   in a day.
 * [https://theeventscalendar.com/knowledgebase/creating-custom-filters-for-filter-bar/](https://theeventscalendar.com/knowledgebase/creating-custom-filters-for-filter-bar/)
 * Is there an array or key I can use for year? It would be nice if this were separate
   from the calendar so that it just controls the results. 
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcustom-year-filter%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Support [tristan083](https://wordpress.org/support/users/tristan083/)
 * (@tristan083)
 * [5 months, 3 weeks ago](https://wordpress.org/support/topic/custom-year-filter/#post-18699156)
 * Hi [@yarnlore](https://wordpress.org/support/users/yarnlore/) ,
 * Thank you for reaching out.
 * I’m afraid there isn’t a separate “year” metadata for events. You can have a 
   look at our [WordPress Post Meta Data Cheatsheet](https://theeventscalendar.com/knowledgebase/events-calendar-pro-wordpress-post-meta-data/)
   to know the different metadata associated with events (tribe_events) posts.
 *  Thread Starter [yarnlore](https://wordpress.org/support/users/yarnlore/)
 * (@yarnlore)
 * [5 months, 3 weeks ago](https://wordpress.org/support/topic/custom-year-filter/#post-18700320)
 * Ah, that explains it then. You’ve no plans to add this post type? Otherwise I’ll
   have to write a JavaScript work around, and that sounds messy.
 *  Plugin Support [Darian](https://wordpress.org/support/users/d0153/)
 * (@d0153)
 * [5 months, 3 weeks ago](https://wordpress.org/support/topic/custom-year-filter/#post-18701346)
 * Hi [@yarnlore](https://wordpress.org/support/users/yarnlore/)
 * Thanks for your message! To clarify what Tristan mentioned, while there isn’t
   a dedicated “year” metadata, you can use the `_EventStartDate` metakey, which
   includes the month, day, and year. You can start with the snippet provided in
   this article: [Creating Custom Filters for Filter Bar](https://theeventscalendar.com/knowledgebase/creating-custom-filters-for-filter-bar/),
   and modify it to filter events by year.
 * Since this involves custom coding, it’s [outside the scope of our standard support](https://theeventscalendar.com/knowledgebase/k/what-support-is-provided-for-license-holders/).
   I recommend reaching out to a developer familiar with WordPress and The Events
   Calendar for assistance. You could also try using ChatGPT or any AI chatbots 
   that you prefer to get some guidance on how to adjust the snippet for your specific
   needs.
 *  Thread Starter [yarnlore](https://wordpress.org/support/users/yarnlore/)
 * (@yarnlore)
 * [5 months, 2 weeks ago](https://wordpress.org/support/topic/custom-year-filter/#post-18701877)
 * No worries, I think that article is what I needed. Thanks!
 *  Plugin Support [Darian](https://wordpress.org/support/users/d0153/)
 * (@d0153)
 * [5 months, 2 weeks ago](https://wordpress.org/support/topic/custom-year-filter/#post-18702666)
 * You’re welcome, [@yarnlore](https://wordpress.org/support/users/yarnlore/) !
 * I’m glad I could assist you with your question.
 * If you have a moment, we’d truly appreciate a positive review from you—it helps
   us continue improving The Events Calendar for everyone:
   [https://wordpress.org/support/plugin/the-events-calendar/reviews/](https://wordpress.org/support/plugin/the-events-calendar/reviews/)
 * I’ll go ahead and close this thread for now. If you have any other questions 
   or need further assistance, please feel free to reach out and open a [Support Ticket](https://theeventscalendar.com/support/#contact)
   through our Help Desk. We’re always here to help, so don’t hesitate to get in
   touch!

Viewing 5 replies - 1 through 5 (of 5 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcustom-year-filter%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/the-events-calendar/assets/icon-256x256.gif?rev=2516440)
 * [The Events Calendar](https://wordpress.org/plugins/the-events-calendar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/the-events-calendar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/the-events-calendar/)
 * [Active Topics](https://wordpress.org/support/plugin/the-events-calendar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/the-events-calendar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/the-events-calendar/reviews/)

## Tags

 * [array](https://wordpress.org/support/topic-tag/array/)
 * [filter](https://wordpress.org/support/topic-tag/filter/)
 * [key](https://wordpress.org/support/topic-tag/key/)

 * 5 replies
 * 3 participants
 * Last reply from: [Darian](https://wordpress.org/support/users/d0153/)
 * Last activity: [5 months, 2 weeks ago](https://wordpress.org/support/topic/custom-year-filter/#post-18702666)
 * Status: resolved