I have a similar problem as The Events Calendar and Sage 9 (blade) but with the Events plugin by Webnus. I’ve read through that page but I don’t think it’s applicable to my problem or I’m just not smart enough to get their solutions to work (read as ‘not understanding them’).
It’s a bit unfortunate that I have a very limited time and noticed this after creating the the rest of the site (left the calendar to be done last, since it is a separate project). I’m hoping that someone not as ridiculously stressed as I am right now could take a quick look to see how best to override MEC’s templates. If it is at all possible. (Google didn’t find me an answer). Hopefully someone else have already implemented this plugin in their Sage theme.
I tried dumping the $template variable in the template.php file, but none of the files worked. I also tried the regular overriding location for MEC “
path/to/theme/single-mec-events.php” and it didn’t work
Thank you for your time!
In case anyone else has the same problem I finally found a comment that helped me!
I was too specific when I searched, and finally searched for “sage 9 override template” and found that comment.
I hope this helps someone else
Hi @paj84 can you please share your single-mec-events template file?
What exactly are you looking for, how to access the data or widgets?
I will share during the coming week, unfortunately I had to postpone the work anyway, so much for limited time.
I was having trouble with the mec template. Managed to make it work.
Attaching my single-mec-event.blade.php template file.
/** no direct access **/
defined('MECEXEC') or die();
* The Template for displaying all single events
* @author Webnus <email@example.com>
* @package MEC/Templates
* @version 1.0.0
<section id="<?php echo apply_filters('mec_single_page_html_id', 'main-content'); ?>" class="<?php echo apply_filters('mec_single_page_html_class', 'mec-container'); ?>">
<?php do_action('mec_before_main_content'); ?>
<?php while(have_posts()): the_post(); ?>
<?php $MEC = MEC::instance(); echo $MEC->single(); ?>
<?php endwhile; // end of the loop. ?>
<?php comments_template(); ?>
<?php do_action('mec_after_main_content'); ?>
I have to do a lot of custom work so I can unfortunately not use the MEC->single. Hope it works out well for you
This topic was automatically closed after 42 days. New replies are no longer allowed.