Styling an event custom post

I’m using the All in One Event Calendar. The plugin is mostly compatible with Pro until I view the details of an event. The event is unformatted.

For example: https://iwc.ccwebdevelopment.com/event/youth-fellowship/?instance_id=1053

I found an event template tutorial at https://time.ly/resources/additional-wordpress-settings/advanced-settings-for-your-timely-wordpress-calendar/edit-event-post-template. I copied single.php to single-ai1ec_event.php and attempted to rebuild the page. I am now stuck with a get_header() returning a broken menu. I am no longer sure if I’m on the path of least resistance. Any suggestions or very relevant documentation would be helpful? Is a child theme overkill for an event custom post template? Thanks.

Hello Chris,

Thanks for writing in!

I have checked your site and I noticed that you are not using any child theme. Because what you are trying to accomplish requires a template customization, we would highly to suggest that you use a child theme. This allows you to make code changes that won’t be overwritten when an X update is released.

Once you have your child theme active and ready, 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

// =============================================================================
// VIEWS/RENEW/WP-SINGLE.PHP
// -----------------------------------------------------------------------------
// Single post output for Renew.
// =============================================================================

$fullwidth = get_post_meta( get_the_ID(), '_x_post_layout', true );

get_header();

?>

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

      <?php while ( have_posts() ) : the_post(); ?>
        <?php x_get_view( 'renew', 'content', get_post_format() ); ?>
        <?php x_get_view( 'global', '_comments-template' ); ?>
      <?php endwhile; ?>

    </div>

    <?php if ( $fullwidth != 'on' ) : ?>
      <?php get_sidebar(); ?>
    <?php endif; ?>

  </div>

<?php get_footer(); ?>

Off course please do not forget to add your modifications.

3] Save the file named as wp-single.php
4] Upload this file to your server in the child theme’s folder wp-content/themes/pro-child/framework/views/renew/

You will have to create the folder path since it does not exist in your Pro Child theme yet.

Hope this helps. Kindly let us know how it goes.

Thanks for the tip with the child theme. I was able to set it up very quickly with your instructions. But after a good night’s rest, I discovered that a stylesheet was not loading for a single event post. Once that was fixed, the page rendered better than expected. Thanks for the support.

Glad it’s working now and you’re most welcome!

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