Posted: August 2, 2014 at 7:18 pm
I’m interested in the Custom Post Type functionality of EE3, but the links on this page – http://eventespresso.com/rich-features/custom-post-types-events/ – don’t seem to be working…
I would like my site structure as follows:
In order to try and achieve this, I am using the custom templates plugin and have moved the required templates to uploads/espresso/templates and that is working fine to allow me to customise the homepage.
The links on the homepage, however, still point to the registration page (/?ee=2, etc) rather than the Custom Post page (which I am assuming is the template I will customise for the detail page).
So my questions are:
1) Is it possible in the homepage loop to output the CPT link instead of the registration page? (or perhaps just get the registration page to use a pretty URL instead?)
2) Is it correct that the default “Event Posts” post type that EE creates does not include an archive page? Or maybe I just have something not working correctly…
3) Given that I want to change the name of the Custom Post Type to ‘Courses’, can I just create a new CPT called ‘Courses’ and set EE to create posts of this type? Or will that not work in the same way as the default post type?
Sorry for all the questions, many thanks for your assistance as usual.
Thanks for letting us know about those links, I’ll get it fixed.
More Custom Post Type info for EE3 can be found here: http://eventespresso.com/wiki/custom-post-types-basic-setup/
1) Yes, but you will need to edit the event and change the Alternate Registration Page (optional) option to the url of the custom post type page, as it isn’t automatic.
2) That’s correct.
3) No sorry, it doesn’t work that way.
You may be better off considering EE4, as the events are native Custom Post Types.
Thanks for getting back to me. Unfortunately we really need to the promotional codes and volume discounts functionality which, I believe, is not supported in EE4…
I guess that it may be possible to create a custom archive page template, then to use a redirect to attain the /courses/ URL and a wildcard redirect to get /courses/course-name…
We are working on the discount system for EE4, I can’t give timescales, but it is being worked on.
Looking over the code again, you could add an archive in, but it involves a small core file edit:
add ‘has_archive’ => true
You will then need to go to Settings > Permalinks and then just press Save to fluch your permalinks.
You can also change the rewrite from events to courses there as well.
That change will be removed on update just so you know.
Sorry that I didn’t find that earlier.
The support post ‘Custom Post Types’ 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.