Posted: April 3, 2014 at 10:21 am
|
Is it possible to have the single event / registration page have a different layout than the event listing page? When I use the [ESPRESSO_EVENTS] shortcode, the list and the single event use the same wordpres template, causing the same title and intro text above the page. What I would like is that the single event page uses a different template. I would like to have it look different and have different intro text on top. Is that possible, and how? If yes, my next questions are: I know using the custom-post-type option would solve above questions. I tried this,but took it out again, because with the provided custom post type templates, I seem to lose a lot of functionality (like timeslots) that I need… I hope you can point me in the right directions, I have been wrestling with this all day. |
Hello, The shortcodes that are shown in WP-admin –> Event Espresso –> General Settings –> Page Settings are needed for Event Espresso to work correctly. You may be interested in the Event List shortcode: https://eventespresso.com/wiki/shortcodes-template-variables/#event-list Note: it does not replace the [ESPRESSO_EVENTS] shortcode which is needed for Event Espresso to work correctly. Pretty permalinks are not available for single event pages. Try the Event List shortcode and then we can take a look at your other questions. It would also be helpful to see your events page. — |
|
|
Thanks. I got it. I can use a page with [EVENT_LIST] for the listpage, and a page with [ESPRESSO_EVENTS] for the single events (and make it use a different wordpress template). Somewhat confusing but it works. I even found this plugin mentioned in the forums to adapt the title tag with the event name in the single event page: I have one question left: Not really relevant anymore, but here are my test pages: List: |
|
Hi, I think you may be mistaking wp_title for the_title. wp_title will change the title tag in the HTML whereas the_title will change the actual page or post title. That being said, I cannot see a way to achieve this. The page is loaded before the event data as the event data is added dynamically. This means that there isn’t a way that I can see to get the right information in time to filter the page title. EE4 helps resolve this problem by using true custom post types for the events, so each even is its own unique post. https://codex.wordpress.org/Plugin_API/Filter_Reference/the_title |
|
Sorry, I meant the_title, you are right. So I guess I am out of luck. |
|
After some tinkering, I finally managed to do it: My page title is now the event title. Same as title tag. function ee_reg_page_ptitle( $etitle ) { if ( function_exists('espresso_get_event') ) { if (isset($this_event_id) && !empty($this_event_id)){ if ( empty( $event_id ) ) return $etitle ; $event = espresso_get_event( $event_id ); if ( empty( $event ) ) return $etitle; if ( $event_id ) { $etitle = ''; $etitle= "$event->event_name "; return $etitle; } add_filter( 'single_post_title', 'ee_reg_page_ptitle', 20, 1 ); |
The support post ‘Single event / registration page using different template than events list 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.