Posted: September 27, 2019 at 7:03 am
|
Our custom course pages are currently setup under slug “/ce-courses/” followed by the page name. When pointing directly at the slug it goes to another custom design page that provides a full listing of the courses we offer. EE is setup under the default “/events” slug and I’d like to get around the need to have basically 2 sets of pages for each course, the EE post AND the custom page. Essentially we are using EE on each of the custom pages through the [ESPRESSO_TICKET_SELECTOR event_id=xxx] shortcode and this works well. It would be nice to be able to use the EE event list page /events/ BUT redirect all the calls within this page to the actual custom event page. So for example: /ce-courses/course1 – custom page, content, and ticket_selector. I’d like all click through links on all /event pages (and any page that uses the [ESPRESSO_EVENTS] tag to instead of linking to the EE events /events/course1… to instead link to the custom page /ce-courses/course1 that I’ve already designed and customized. I *kind* of got this to work by accident by using the CPT rewrite filter below and *NOT* refreshing the permalinks. As soon as I go into permalinks and then just touch / save the file this code rewrites the entire slug and changes the category as intended. Is there a way via filter or otherwise to selectively apply a link rewrite on all event pages to their corresponding /ce-courses pages. This would also fix the link in the emails that go out to registrants that link back to the /events/course1 version of the page. Why even try and do this to begin with vs. just using EE event as it was intended? I am using visual composer on my custom pages and there is some page or CSS weirdness that is introduced when trying to copy and paste all the raw HTML into the EE event page. Also I would like a custom page to be displayed when users go to /ce-courses/ instead of that linking to the default EE event list page if for instance I changed the entire event slug option under Event List Pages. Any help would be greatly appreciated! |
Hi, One thing you could do is set up a redirect for /events/ and redirect it to /ce-courses/ This would involve: |
|
|
Hi Josh, |
It can be done with a filter, but the links in the messages won’t be affected. Here’s an example of a filter function that you could modify/use/adapt:
Then to change the event URL within the emails you could build a custom shortcode for outputting the custom URL. Here’s a link to the documentation that outlines how to create a custom message template shortcode: https://eventespresso.com/wiki/messages-system-how-to-add-custom-message-shortcodes/ |
|
The support post ‘Redirect all espresso post pages to something other than slug’ 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.