Need ability to replicate core file to child theme

Home Forums Calendar Products Events Calendar PRO Need ability to replicate core file to child theme

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1122911
    scamrcalendar
    Participant

    I want to make a change to general.php, so that I can add the year back to the date format for the single item event pages. Right now, the year will not display for the current year, only past or future years. However, after digging though the knowledge base, I found that only files that are in /src/views can be replicated in themes or child themes, not src/Tribe or any other directory in the plugin.

    If there is another way to make this change, that’d be great! Otherwise, it would be nice to be able to replicate core files into a child theme, so edits aren’t lost when The Events Calendar is updated.

    Thanks!

    PS – Great plug in!

    #1123056
    Brian
    Member

    Hi,

    Thanks for using our plugins. I can help out here.

    If you would like to change it so that the year shows for events in the current year. Go to this setting:

    Events > Settings > Display Tab > Date without year

    Then change the setting to this: F j Y

    That should show the year then for events in the current year.

    As for editing core files in a theme, that is not possible nor would it ever be possible for core files to be moved to the theme besides the template files in the src/views directory. PHP does not work that way nor would it ever be considered good practice to do that as it creates huge performance, security, and support issues.

    The recommended way to modify in WordPress is through actions and filters and through our themer’s guide:

    https://theeventscalendar.com/knowledgebase/themers-guide/

    https://theeventscalendar.com/knowledgebase/template-overview/

    Another option is to take a function from the general.php tab add it to your theme’s functions.php, rename it and change the output to what you would like and then use it in the template added to your tribe-events directory.

    Cheers

    #1129918
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Need ability to replicate core file to child theme’ is closed to new replies.