Custom Templates Showing Two Events

Home Forums Calendar Products Events Calendar PRO Custom Templates Showing Two Events

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #56884
    flipp
    Participant

    I’m trying to use custom events template but the page loads two events, the first with an ID of -9999 (which of course doesn’t exist) and the second being the correct one.

    You should be able to easily reproduce this by simply copying the ‘default-template.php’ file from ‘/plugins/the-events-calendar/views/’ to ‘/themes/mytheme/’ and insert the line “Template Name: My Event Template” to make WordPress see it as a template.

    Once you change the events template in “The Events Calendar Settings > Display” you should see that it now renders two templates. The first one has no fields to display since it tries to load ID: -9999 but it does render the rest of the skeleton including the “<< All Events” links ect.

    This is a major issue for us right now, the default template doesn’t work for our client and it looks like the only way around this currently is to edit the plugin views directly, however any changes made there will be lost if the plugin is updated in the future.

    #57016
    adamfitz
    Participant

    I just hit this too. It’s something in the way it’s loading custom templates. If you move your custom page template to //tribe-events/default-template.php and change the events template back to default, it will render properly again with your custom code.

    #57017
    adamfitz
    Participant

    That should be *your theme*/tribe-events/default-template.php (I lost some ampersands)

    #57104
    Jonah
    Participant

    Hi guys,

    Yes, using the default-template.php file in the root of your theme will not work. You need to place it in a ‘tribe-events’ folder. You cannot use this as a standard WordPress page template, so adding a template name like flipp has done will have unforseen consequences but this is not how we’ve designed our plugin to work and you would need to do your own modifications in order to get it to work this way.

    Regards,
    Jonah

    #979694
    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 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Custom Templates Showing Two Events’ is closed to new replies.