Skip Navigation

[Resolved] Layouts and the Events Organiser plugin

This support ticket is created 7 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 9 replies, has 2 voices.

Last updated by Christian Cox 7 years, 1 month ago.

Assisted by: Christian Cox.

Author
Posts
#494913
eo-settings-template-handling.JPG
layouts-eo.jpg
layouts-eo-header-footer.JPG
layouts-eo-event-layout.JPG

I am trying to: Use the Events Organiser plugin with Layouts

I visited this URL: My website at utcheterpress.com

I expected to see: My parent Header Footer layout, with the EO template part displaying in the Post Content cell defined in the Layout for Events

Instead, I got: EO template also being pulled into the Visual Editor cells in the Header and Footer, as well as EO template part displaying in the Post Content cell.

For the record, I'm trying out Layouts before trying the new Beaver Themer Alpha as I'm keen to utilise the Toolset suite of plugins as much as possible. However, I'm finding Layouts (the latest version) rather clunky.

Issue 1. The current problem I'm having is that I'm using the Events Organiser plugin, which I used with Beaver Builder theme and plugin with no issues. The EO has an option to copy the template files into your theme, which I've done with my child theme based on the Toolset Starter Theme.

With the EO theme compatability mode or Enable template handling option selected, the template returns just fine in the Post Content cell, but it's also being pulled into the Visual Editor cells.

Disabling template handling in EO corrects the problem in the Header Footer VE cells, but of course, only the post body is returned in the Post Content cell.

Also, if I attempt to assign the Layout for Events to single events by clicking the 'Use this layout for 233 Events' buttons in the Edit Layout page, I get asked if I want to assign it, I okay it, and Success, All Events were updated. However, the button still exists.

Issue 2. Even though there is a Venue post type with the EO plugin, there is no option at all to assign a Layout to venue posts.

I attach screenshots.

As an aside, I've found that events plugins generally are a pain when working with Toolset (in fact, they're a pain in general). It would be great if Toolset could create an events plugin that was compatible with Views, CRED, etc - it would make life a whole load easier.

Thanks and all the best. Gavin.

#494973

Regards Issue 2. The post type cannot be found if using the new Beaver Builder Themer Alpha either. I've raised it with the plugin developer.

#495137

Hi Gavin, thanks for the detailed report. I'll be happy to take a look. You said:

The EO has an option to copy the template files into your theme, which I've done with my child theme

Can you tell me more about how this works? Does this operation copy files over into your new child theme, or overwrite existing files in your new theme? Which files?

I'd also like to take a look at your debug information so I can get an idea of the environment you are working with. We have an excellent article with instructions located here: https://toolset.com/faq/provide-debug-information-faster-support/

NOTE: Please be sure to check the box to indicate you can provide debug info and paste your debug info in the debug field provided, and NOT in the general response field.

#495565

Hi Christopher

EO allows you to copy template files from plugins/event-organiser/templates/ to themes/my-theme/.

This is copying not moving.

So for example, if I want to make some changes to the single event post, I'll copy event-meta-event-single.php and single-event.php to my theme folder, open those and make the changes.

I have a staging site set up if you'd like access to that.

Thanks. Gavin.

#495581

Thanks, the staging site will be helpful for me as well. I will provide some private reply fields here so you can send me the login credentials. I'll log in and take a look at your setup.

#495782

I see, thanks for the info. Please refer to this document:
https://toolset.com/documentation/user-guides/layouts-theme-integration/

When you copied the plugin files over into your custom theme, you brought over some code that needs to be modified to work with Layouts. This document talks about how to accomplish that. Step 1: "Replacing the standard WordPress loop with Layouts" - this will give you some examples that show how to replace the loop in each template file.

Once you have followed these directions, please test your events pages and scan the rest of the document if you need to troubleshoot any issues. If you're stuck, feel free to reach out and I'll see if I can help you.

#498199

Thanks Christian. I'll have a play hopefully later today and let you know how it goes.

#498370

Ok let me know how it goes.

#499908

Hi Christian.

Okay, so I replaced the default loop with

<?php the_ddlayout( 'default-layout' ); ?>

and disabled template handling in the EO plugin settings.

This removes the duplicate content in the Visual Editor cells for the header and footer areas, and displays the content in the content area.

However, the meta information from another EO template that was being called in the original EO single-event.php file is missing. Where do I insert this call?

This is the original call

<?php eo_get_template_part( 'event-meta', 'event-single' ); ?>

I notice there's 'default-layout' in the_ddlayout loop, so can I create a 'single-event-layout' template somewhere. If so, where does this go?

Thanks. Gavin.

#500337

Hi, good to see you're making progress. I'll try to answer your questions.

However, the meta information from another EO template that was being called in the original EO single-event.php file is missing. Where do I insert this call?

<?php eo_get_template_part( 'event-meta', 'event-single' ); ?>

Assuming you want this meta information to appear outside of the content area (the area controlled by Layouts), you may add this PHP template call anywhere in single-event.php. Some basic HTML and CSS knowledge is required so your overall page design looks consistent.

If you want this meta information to appear inside the content area, however, so it can be used in a Layout cell, this will require custom code. You will not be able to place PHP code inside a Layouts cell, but you may use any shortcodes provided by EO or made on your own. It's possible EO has a shortcode that will render the template part for you. I'm not very familiar with EO, so unfortunately I'm unable to provide assistance with this.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.