Support

Home Forums Events Calendar Add-on EE4: permalink Archive Events list overrules permalink Calendar page :-(

EE4: permalink Archive Events list overrules permalink Calendar page :-(

Posted: March 11, 2022 at 8:57 am


Marco

March 11, 2022 at 8:57 am

Hi support,

I’m selling only one type of events on my website: workshops. I’m using EE4 plus the Events Calendar Add-on.

To show nice permalinks on my website I have changed the Custom Post Type (CPT) Slug from /events to /workshops. I also created a new page to show the Calendar view by using shortcode [ESPRESSO_CALENDAR cal_view=month]. The permalink of this new webpage is /workshops.

The weird thing that appears is that when I navigate to /workshops, the default Archive Events list displays, instead of the webpage containing the Calendar.

Please advise me how to disable the default Archives Event list. Or maybe there’s another solution to achieve what I want.

What do I want?
1. Calendar to be shown on: mywebsite.nl/workshops/
2. Permalink Single Events: mywebsite.nl/workshops/slug workshop/

Thx in advance for you help!

Kind regards,
Marco


Tony

  • Support Staff

March 14, 2022 at 6:39 am

Hi there,

To show nice permalinks on my website I have changed the Custom Post Type (CPT) Slug from /events to /workshops.

That events slug is the EE event post type slug and WordPress uses that for the post type archive, the archive is considered a higher priority to display than a page. That means, in your case that /workshops tells WordPress to show the event archive rather than the /workshops page containing your ESPRESSO_CALENDAR shortcode.

(Note the above is WordPress displaying the content, not Event Espresso)

Now, it is possible to do what you want to do, but you need a custom archive-espresso_events.php template created from your theme and then load the calendar shortcode within the template.

Are you familiar with creating custom theme templates?


Marco

March 16, 2022 at 4:41 pm

Hi Tony,

I’m not familiar with creating custom theme templates (yet). However, I know how to create a child theme, I’m familiar with ftp (FileZilla). The theme of my website is Astra Pro (child theme). I hope you can point me in the right direction.

I’ve already the following instruction https://gist.github.com/lorenzocaum/16aac08f099d7c154f04

Is that instruction applicable and still up-to-date?


Tony

  • Support Staff

March 17, 2022 at 5:42 am

Yes, that can be used but you only want the details relating to the archive template… not single

The support post ‘EE4: permalink Archive Events list overrules permalink Calendar page :-(’ 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