Support

Home Forums Event Espresso Premium Make custom events page look identical to orgininal template using short codes?

Make custom events page look identical to orgininal template using short codes?

Posted: February 4, 2016 at 6:15 pm


SFC

February 4, 2016 at 6:15 pm

Hello – I really appreciate the way that the events page is currently laid out for our site in EE4 but I want to be able to more easily change some of it’s content, including adding a widget column. What is the combination of shortcodes I need to use to mimic the original template while retaining some of the layout functionality of my canvas theme. I’ve tried to choose the shortcodes that I thought would do the same but I must be missing something. Essentially I want the page to look like this: http://www.strategicfirecontrol.com/events/ but adding a column that will display the calendar widget. Thanks again for you amazing support.


Tony

  • Support Staff

February 5, 2016 at 4:35 am

Hi there,

Are you looking to add another page or edit that one? If the theme has a template available that displays a sidebar you should be able to create a new page, select that template and use the [ESPRESSO_EVENTS] shortcode.

The default /events/ ‘page’ is not actually a page, its an archive of EE events and uses your themes archive.php template file, so if you want to add a sidebar to that section you’ll need to create a custom template.

Are you comfortable with PHP, HTML and WP Template files?


SFC

February 5, 2016 at 9:30 am

I can edit them if I’m told what to do.


Josh

  • Support Staff

February 5, 2016 at 10:05 am

Hi there,

This would be a bit easier if Canvas had some hooks for this, but you can override their pluggable function that handles the sidebar layout options to make this happen.

Here are the steps to make Event Espresso archives have a sidebar for the Canvas theme:

1) Set up and activate a child theme if you have not already.
2) You copy the entire woo_get_layout() function from /canvas/includes/theme-actions.php into your child theme’s functions.php file.
3) Inside your copy, just before the return $layout; at the end, you add this:

// Event Espresso archives layout.
if ( is_tax( 'espresso_event_categories' ) || is_post_type_archive( 'espresso_events' ) ) {
	$layout = 'two-col-left';
}

4. Save your functions.php file.

The result will be you’ll have a sidebar on the right side on this page.

The support post ‘Make custom events page look identical to orgininal template using short codes?’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso