Custom MEC Archive Page

That’s great! I tried to create an archive page but when I tried to set the condition I don’t see one for “events” are being viewed. Which condition should I choose to make sure when someone goes to the events archive that one shows? With the blog it’s easy but there are multiple events options but I don’t see one for just the events archive. I must be missing something lol

Thank you

Thank you for the update. You should be able to select taxonomies related to events in the Conditions option. If this is not available, please provide the login details in a secure note so we can check the site settings.

I did figure it out thank you. Aside from the title and featured image and the content, how do I tell what the keys are for the different parts of the post? When I choose post:meta it has a selection of items but it just shows the id number and it doesn’t show things like event details like time and location and organizer name and picture, etc. I tired to just use the MEC sidebar widget but it’s not showing up at all. I did go to Wordpress dashboard and go to appearance and widgets and choose the MEC single sidebar and added the MEC single sidebar items. I also went to the Settings in MEC calendar and went to single event and sidebar, everything is checked. And I have it added on the page as a widget.

Hello Melanie,

You may need to use the Widget Area element in your custom layout.

This will then allows you to select the MEC sidebar widget to display in your layout.

Kindly let us know how it goes.

I tried but I can’t get the widget to show anything. I followed the instructions, I even made my own sidebar and tried that. I can view other sidebars but not the MEC Single Event Widget.

Also my single layout is pulling multiple events through. The condition only allows me to set it to post type = event. I can’t choose mec-events. And unless I set a Looper Provider as a query builder it only pulls through my blog posts.

Hey Melanie,

We would love to check your custom layout if we can get access to your WP dashboard. 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

Cheers.

Ok, thank you. I have not added the archive page to the menu yet as it is a new feature on my clients website and it’s not ready yet but it is live and the articles are published.

Thank you for the update. You may have forgotten to include the site URL. Please include the info in the secure note.

I added it to the secure note. I’m sorry lol

Thank you for the info. The widget is not displaying because of this condition in the wp-content/plugins/modern-events-calendar-lite/app/widgets/single.php:72 file.

$single = $GLOBALS['mec-widget-single'] ?? null;
$event = $GLOBALS['mec-widget-event'] ?? null;

if (!$single || !$event) return null;

The $GLOBALS[‘mec-widget-single’] and $GLOBALS[‘mec-widget-event’] are only available when using the default templates (e.g modern-events-calendar-lite/app/skins/single/default.php). Due to this limitation, you may need to refrain from using the MEC Single Sidebar Items widget.

Best regards.

Ok that’s unfortunate, but alright. What about the single layout issue then?

Thank you

The Event in the list is the actual MEC post type. We checked the Looper Provider in the Event Layout and it is pulling the MEC events correctly. Setting the condition to Post Type > is > Event also works as expected.

Is this what you’re trying to do?

I only want it to show one event. So when someone visits the archive and picks an event, this single layout appears for the one event. I don’t want it to pull all the events. It’s supposed to be a single event layout.

Thank you for the clarification. We initially thought you were trying to display related events in the single layout. We have disabled all Looper Providers in the Event Layout because they are not necessary. You can directly use event dynamic template in the page without the Looper Provider.

Ok, when I disabled the looper providers it only pulled through my blog posts. So you removed the looper providers and it still pulled the events dynamic data? I wonder why It didn’t for me?

Yes, we disabled the Looper Provider, and it pulled the correct data. It’s possible that the conditions were not yet set when you tested it, so it defaulted to the posts. Did you check the Event Layout?

I just looked at it, yes it’s pulling through properly. Thank you for your help.

One last item that I mentioned above, I’m having difficulty pulling through the dynamic content. For example, if I type {{dc:post:meta key=“mec_location_id””}} it just gives me the ID number not the actual name of the location. I have tried a nested {{dc:post:title id="{{dc:post:meta key=‘mec_location_id’}}"}} but that shows me just the event title. ACF and regular posts are easy to pull the data. This is not as straightforward.

Could you please help me figure out how to pull the information from the single event outside of just the title, featured image and content. Things like the organizer picture and name and contact details, the location name and address, the hourly schedule if there is one, and all the rest of the areas in the post.

This is possible but it is currently limited to a few fields. We enabled Twig and added examples in the Event Layout page.

To learn more about Twig templates, please check this link: https://theme.co/docs/twig

If you need help with this type of modifications, you can check out our One service.

Ok thank you