The Events Calendar + Pro Theme - Template breaks unless using blank template

I noticed that if I set the template for The Events Calendar to one of the primary Pro Theme page templates (eg: Layout - Content Left, Sidebar Right), The Events Calendar will show as if it were a blog post with a read more link. If I use a blank template, however (Blank - Container | Header, Footer), the plugin displays the events template properly and without issue.

Is there any reason for this or possibly an easy way to fix it?

Hello Vaughn,

Thanks for writing in!

The Blank - Container or Blank - No Container page templates displays the page content right away. The default page template or the Layout - Content Left, Sidebar Right will display the page content layout according to the stack being used. I think the events calendar pro has its template or uses default page template. You may create a custom template which will be used exclusively for your Events Calendar.

To create the custom template, please follow these steps below:
1] Using Notepad or TextEdit or Sublime Text or any text editor, please create a new file in your local machine.
2] Insert the following code into that new file

<?php

// =============================================================================
// TEMPLATE NAME: Layout - Events Calendar
// -----------------------------------------------------------------------------
// Handles output of the Events Calendar.
//
// =============================================================================

get_header();

?>

  <div class="x-container max width offset">
    <div class="<?php x_main_content_class(); ?>" role="main">

		<?php while ( have_posts() ) : the_post(); ?>

		  <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
		    <?php x_get_view( 'global', '_content', 'the-content' ); ?>
		  </article>

		<?php endwhile; ?>

    </div>

    <?php get_sidebar(); ?>

  </div>

<?php get_footer(); ?>

3] Save the file named as template-layout-events-calendar
4] Upload this file to your server in the child theme’s folder wp-conten/themes/pro-child/

And when you edit your Events Calendar page, please select the “Layout - Events Calendar” page template.

We would loved to know if this has work for you. Thank you.

1 Like

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