Home › Forums › Calendar Products › Events Calendar PRO › Custom Templates Showing Two Events
- This topic has 4 replies, 4 voices, and was last updated 10 years, 9 months ago by
Support Droid.
-
AuthorPosts
-
July 24, 2013 at 10:22 am #56884
flipp
ParticipantI’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.
July 24, 2013 at 9:16 pm #57016adamfitz
ParticipantI 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.
July 24, 2013 at 9:17 pm #57017adamfitz
ParticipantThat should be *your theme*/tribe-events/default-template.php (I lost some ampersands)
July 25, 2013 at 8:58 am #57104Jonah
ParticipantHi 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,
JonahJuly 7, 2015 at 6:27 am #979694Support Droid
KeymasterThis 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. -
AuthorPosts
- The topic ‘Custom Templates Showing Two Events’ is closed to new replies.
