Support » Plugin: The Events Calendar » Overwrite Query.php function

  • So I’m working on a client website and there was a hard code solution made to the /wp-content/plugins/the-events-calendar/src/Tribe/Query.php file to the function getHideFromUpcomingEvents(). Obviously, I have re-add this custom code every time I update the plugin. Is there a better way to tackle this issue?

Viewing 1 replies (of 1 total)
  • Hi @sproutchris,

    Thanks for taking the time to reach out! You can make changes to plugin functions without resorting to hard-coded solutions by using filters or hooks to modify your queries. Simply adapt the code from your Query.php file to a separate function in a custom plugin or theme file, then replace that in the template files. Our Themer’s Guide provides some more information on how modifications work with our plugins and may be useful to you as you’re making these changes!

    I hope that helps to get you started! Thanks again for reaching out, and let us know if you should have any other questions!

Viewing 1 replies (of 1 total)
  • The topic ‘Overwrite Query.php function’ is closed to new replies.