Posted: August 27, 2015 at 11:04 am
|
I’ve been trying to move the date/time above the ticket selector. Have gone through various posts here (eg https://eventespresso.com/topic/ee4-move-event-registration-listing-date-and-time/) and have followed instructions but I just can’t get it to work. It would make far more sense for the order of a single event page to be Title, Date/Time, Ticket Selector, Event details, People. I was able to move the people associated with an event to the bottom of the page (YAY!) but just can’t get the other change to work. HELP!! Thanks, Ellen. |
Hi Ellen, Can you let me know what you have setup so far? For example, have you included the function here: https://gist.github.com/joshfeck/1151c89082ccb5c0b478 Within your themes functions.php file or a Site Specific Plugin? How have you moved the people associated to the event? |
|
|
Hi Tony I’ve done a functions file rather than a plugin, and this is what I’ve got: <?php // Opening PHP tag – nothing should be before this, not even whitespace // https://eventespresso.com/topic/ee4-people-addon-how-to-move-person-to-end-of-single-content // move the date and time above the ticket selector // remove tickets // move people to end of event // remove INSTRUCTOR // add INSTRUCTOR after the content There is more at the end of this file to rename tickets and a couple of other terms (which worked with no problems). I’ve also copied the content-espresso_events.php and loop-espresso_events.php files to uploads/espresso/templates (and renamed the files in the plugin folder to old_ ). Haven’t done anything in the loop file, but reordered the list in the events file. Thanks |
Hi Ellen, Could you replace the coding towards the beginning of your functions.php file with this? add_filter ('the_content', 'my_remove_event_datetimes', 100 ); // remove datetimes function my_remove_event_datetimes( $content ) { if ( 'espresso_events' == get_post_type() && is_singular() && !post_password_required() ) { remove_filter( 'the_content', array( 'EED_Event_Single', 'event_datetimes' ), 110 ); add_filter( 'the_content', 'my_add_event_datetimes', 121); } return $content; } // add datetimes after the tickets function my_add_event_datetimes( $content ) { return $content . EEH_Template::locate_template( 'content-espresso_events-datetimes.php' ); } add_filter ('the_content', 'my_remove_event_tickets', 100 ); // remove tickets function my_remove_event_tickets( $content ) { if ( 'espresso_events' == get_post_type() && is_singular() && !post_password_required() ) { remove_filter( 'the_content', array( 'EED_Event_Single', 'event_tickets' ), 120 ); add_filter( 'the_content', 'my_add_event_tickets', 122); } return $content; } // add tickets after the content function my_add_event_tickets( $content ) { return $content . EEH_Template::locate_template( 'content-espresso_events-tickets.php' ); } It will move the datetimes above the ticket selector. Thanks — |
|
|
Awesome, thank you! But … it moved the date/time and ticket selector (which are in the right order :)) under the event content and I need them to show before, ie Date/Time, Ticket Selector, Event Details, People. And, do I need to leave the templates I copied over to the uploads/espresso/templates in that location? It seems to have no effect on the display even though I’ve changed the order that I want the different sections to show in. Thanks |
|
Awesome, thank you! But … it moved the date/time and ticket selector (which are in the right order :)) under the event content and I need them to show before, ie Date/Time, Ticket Selector, Event Details, People. (here’s an example of what it looks like now http://cp149.ezyreg.com/~nsns2799/site/events/reliving-the-past-writing-historical-fiction-with-sulari-gentill/) And, do I need to leave the templates I copied over to the uploads/espresso/templates in that location? It seems to have no effect on the display even though I’ve changed the order that I want the different sections to show in. Thanks |
Hi Ellen, there is another way to make the change. Go ahead and remove those filters from your functions.php file as they won’t be needed. Then take a look at this link: https://gist.github.com/lorenzocaum/a33405557a2a065779ea#gistcomment-1379311 For step 1, use this file: http://cl.ly/code/0J3Q2D0B192O/download/content-espresso_events.php Then follow the remaining steps. Once you are done, the order will be: Event name, event description, event datetimes, event ticket selector, venue information (if enabled) — |
|
Hello again Ellen, As of Event Espresso 4.8.21, there is a custom display re-order option available in the WordPress dashboard. Backup your WordPress and update your software https://eventespresso.com/wiki/how-to-back-up-your-site/ You can see the change log for Event Espresso 4 here: https://eventespresso.com/wiki/ee4-changelog/ Remove existing filters for adjusting the order If you have used some of the suggested filters to adjust the order of your event elements, then you’ll want to first remove those from your website and they may have been added to your child theme’s functions.php file or a site specific plugin. Set a custom order through the Templates screen Afterwards, go to your WP dashboard (WP-admin) –> Event Espresso –> Events –> Templates. The Use Custom Display Order options in the Templates screen can be used to reorder the events elements on the single event page as well as the events listing page. Again, be sure that any of the filters for adjusting the order have been removed from your site specific plugin or your child theme’s functions.php file before turning on the template reorder option. Otherwise, you may see duplicate content. Thanks — |
|
The support post ‘EE4 move date/time above ticket selector’ 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.