No header/footer template for MEC

Hi,

I’d like to remove headers and footers on my MEC event pages. I found this topic, which has some information about how it might be possible, but I’m unclear on how to implement:

Any help you can offer with this is much appreciated :blush:

Hello @outpost33,

Thanks for writing in! Are you using a custom template as well? We might need to check one of your MEC event page. To better assist you with the issue, please provide us your WP Access instead. You can create a secure note in your next reply with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
– Confirmation that we can access and make changes to your site

To know how to create a secure note, please check this out: How The Forum Works

image

Best Regards.

Hi @ruenel

Thanks for your response, I have not yet created a custom template for the events pages – hoping you can offer some guidance on creating a simple no header/no footer template for events.

Please find the details you require in the secure note.

Hello @outpost33,

You can simply do the following:
1.) Open Notepad or any text editor.
2.) Insert this code:

<?php

// =============================================================================

// -----------------------------------------------------------------------------
// An MEC single event layout
// =============================================================================

if ( apply_filters( 'x_legacy_cranium_headers', true ) ) {
  x_get_view( 'global', '_header' );
} else {
  get_header();
}

?>

<?php do_action('mec_before_main_content'); ?>
<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 while(have_posts()): the_post(); ?>
		<?php $MEC = MEC::instance(); echo $MEC->single(); ?>
	<?php endwhile; // end of the loop. ?>
	<?php comments_template(); ?>
</section>
<?php do_action('mec_after_main_content'); ?>

<?php

if ( apply_filters( 'x_legacy_cranium_footers', true ) ) {
  x_get_view( 'global', '_footer' );
} else {
  get_footer();
}

?>

3.) Save the file as single-mec-events.php and upload it in your child theme’s folder.

This should make your MEC single event pages display without the header and the footer.

Be advised that custom Coding is beyond the scope of our support under our Support Policy. If you are unfamiliar with code and resolving potential conflicts, you may select our One service for further assistance.

The code above serves as an example code. Feel free to modify it when needed. You will have to maintain any custom coding to make sure that it will still work after any updates or does not create any issues or incompatibility in the future.

Best Regards.

Hi @ruenel,

Thank you! I will try the template and let you know how it goes.

Meanwhile can you tell me where in the child theme the new file should be placed? EDIT: It’s ok, I figured it out

Many thanks again :blush:

Hi @ruenel,

Quick question – are there any plans to allow direct editing of the event page layouts in Cornerstone? Currently the developer offers an Elementor addon, but it would be great to have this degree of control within the X/Pro ecosystem.

Hi @outpost33,

Do you want to edit the events using the Cornerstone? If that is the case, you can enable the Page Builder for the Events from Cornerstone > Settings > Permission.

Hope it helps.
Thanks

Hi @tristup, @ruenel

I am already aware that it’s possible to edit events in Cornerstone as you suggest, I was actually referring to using the Layout Builder to make a custom template.

Hi @outpost33,

That is not possible at this moment. I have added this as a feature request, so our development team will take it into the consideration in future.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.