Home › Forums › Calendar Products › Events Calendar PRO › Add shortcake to event pages
- This topic has 8 replies, 2 voices, and was last updated 8 years, 8 months ago by
William Lee.
-
AuthorPosts
-
July 26, 2017 at 9:37 am #1326433
William Lee
ParticipantI am using default-template.php in a child theme to run some short codes on event pages. Something changed recently, though, and it’s no longer working. I’m not sure who helped me get this code, so I’ll ask here first before checking with the theme author.
The code I’m using is this:
<?php /** * Default Events Template * This file is the basic wrapper template for all the views if 'Default Events Template' * is selected in Events -> Settings -> Template -> Events Template. * * Override this template in your own theme by creating a file at [your-theme]/tribe-events/default-template.php * * @package TribeEventsCalendar * */ if ( ! defined( 'ABSPATH' ) ) { die( '-1' ); } get_header(); ?> <div id="tribe-events-pg-template"> <?php tribe_events_before_html(); ?> <?php tribe_get_view(); ?> <?php tribe_events_after_html(); ?> </div> <!-- #tribe-events-pg-template --> <?php echo do_shortcode('[et_pb_section global_module="28988"][/et_pb_section][et_pb_section global_module="28989"][/et_pb_section]'); ?> <?php get_footer();That’s supposed to put two Divi sections at the bottom of event pages. They’re no longer showing up. Any ideas?
July 27, 2017 at 7:27 am #1326878William Lee
Participanthahah! I just noticed my title autocorrected “shortcode” to “shortcake”! 🙂
July 27, 2017 at 1:52 pm #1327125Cliff
MemberHi, William.
I’m glad you clarified because there actually is a Shortcake plugin that deals with shortcodes:Â https://wordpress.org/plugins/shortcode-ui/
/wp-content/plugins/the-events-calendar/src/views/default-template.php is the original file. In the current version of that file, it tells you where to put your override file: [your-active-theme]/tribe-events/default-template.php
Is this where you’ve put your file?
July 28, 2017 at 8:23 am #1327445William Lee
ParticipantYes, that’s where I put it.
July 28, 2017 at 8:08 pm #1327777Cliff
MemberThis template only gets called if Default Events Template is selected at wp-admin > Events > Settings > Display tab… which I think you do have selected based on your System Information Report.
Please copy /wp-content/plugins/the-events-calendar/src/views/default-template.php from the latest version of the plugin and then replace your [your-active-theme]/tribe-events/default-template.php file with this new copy, then make an edit just to see if it takes effect.
I tried this on my localhost site and it worked fine.
You might need to clear your server and/or browser cache to see the effect.
Please let me know how this goes for you.
July 31, 2017 at 7:33 am #1328333William Lee
ParticipantDidn’t solve it. Cleared the cache on the server and the browser. Still nothing.
July 31, 2017 at 6:55 pm #1328578Cliff
MemberIn this case, I’d suggest trying to echo a different shortcode via do_shortcode… such as ‘gallery’ or a shortcode from a different plugin, not Divi.
August 22, 2017 at 9:35 am #1338603Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Add shortcake to event pages’ is closed to new replies.
