The following filters are no longer recommended as a way to adjust the order of the event elements in Event Espresso 4. As of Event Espresso 4.8.21, there is a template re-order option in WP-admin --> Event Espresso --> Events --> Templates. The Templates screen can be used to reorder the events elements on the single event page as well as the events listing page.
<?php
//* Do NOT include the opening php tag
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', 122);
}
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', 121);
}
return $content;
}
// add tickets after the content
function my_add_event_tickets( $content ) {
return $content . EEH_Template::locate_template( 'content-espresso_events-tickets.php' );
}
References:
https://eventespresso.com/topic/cant-access-wp-admin-after-ee-update/
https://eventespresso.com/topic/ee4-template-customization/
https://eventespresso.com/topic/how-to-move-ticket-selector-from-top-in-ee4/
https://eventespresso.com/topic/moving-text/
https://eventespresso.com/topic/split-need-help-to-figure-out-how-to-setup-this-conference/
https://eventespresso.com/topic/change-event-details-order-on-archive-page/
https://eventespresso.com/topic/change-order-of-fields-in-single-event-page/
https://eventespresso.com/topic/changing-around-the-single-event-page/
https://eventespresso.com/topic/custom-event-registration-page/
https://eventespresso.com/topic/customize-event-detail-page/
https://eventespresso.com/topic/customizing-event-pages/
https://eventespresso.com/topic/customizing-the-event-page-2/
https://eventespresso.com/topic/edit-templates-in-ee4/
https://eventespresso.com/topic/ee4-event-item-order/
https://eventespresso.com/topic/ee4-move-datetime-above-ticket-selector/
https://eventespresso.com/topic/ee4-move-event-registration-listing-date-and-time/
https://eventespresso.com/topic/ee4-need-to-customise-single-event-template/
https://eventespresso.com/topic/ee4-people-addon-how-to-move-person-to-end-of-single-content/
https://eventespresso.com/topic/event-description-before-ticket-options/
https://eventespresso.com/topic/event-page-elemtns-got-rearranged-ee4/
https://eventespresso.com/topic/event-templating/
https://eventespresso.com/topic/how-do-i-move-the-register-now-button-or-whole-block-to-bottom-of-page/
https://eventespresso.com/topic/how-to-make-small-template-customization/
https://eventespresso.com/topic/managing-mulitiple-events-on-behalf-of-clients/
https://eventespresso.com/topic/moving-elements-around-within-templates/
https://eventespresso.com/topic/moving-event-elements-within-event-page/
http://eventespresso.com/topic/move-people-to-the-bottom-of-the-event-listing-page-rather-than-the-top/
https://eventespresso.com/topic/problem-with-modified-installation/
https://eventespresso.com/topic/problems-moving-the-description-on-the-event-page-for-purchasing-tickets/
https://eventespresso.com/topic/single-event-detail-page-problems/
https://eventespresso.com/topic/social-media-problem/
https://eventespresso.com/topic/split-editing-registration-confirmation-email-message/
https://eventespresso.com/topic/where-ticket-selector-is-displayed/
https://eventespresso.com/topic/can-i-move-the-body-of-an-event-above-the-ticket-selector/
View more recommendations for Event Espresso:
http://enzo12.com/labs/event-espresso/