Support

Home Forums Event Espresso Premium EE4 move event-registration listing date and time

EE4 move event-registration listing date and time

Posted: August 6, 2015 at 3:40 pm


Maureen McNamara

August 6, 2015 at 3:40 pm

On this page:
http://cannabistrainers.com/event-registration/

I want to move the date and time under the title of the class above the <hr>.

It is not user friendly with it displayed below the register button. It doesn’t make sense that way.

I’ve read a number of posts but am a little turned around as to the best approach.

Please advise.


Jonathan Wilson

August 6, 2015 at 4:42 pm

Hey Maureen,

You may want to try moving the ticket selector below the content. This will push the datetime information below the title: https://gist.github.com/joshfeck/1151c89082ccb5c0b478


Maureen McNamara

August 11, 2015 at 11:46 am

Hi There

I’ve created a site specific plugin to change the Max. tickets message, which is working fine.

I’ve added the above code copied and pasted out of github.

<?php
/*
Plugin Name: Cannabis Trainers Website Special Features
Description: Site specific code changes for Event Espresso, etc.
*/

//* Event Espresso – Change the maximum tickets messaging that is shown below the ticket (pricing option)selector
function ee_maximum_tickets_messaging_ticket_selector( $translated, $original, $domain ) {
$strings = array(
‘Please note that a maximum number of %1$d tickets can be purchased for this event per order.’ => ‘Max. number of %1$d tickets per order.’,
);
if ( isset( $strings[$original] ) ) {
$translations = get_translations_for_domain( $domain );
$translated = $translations->translate( $strings[$original] );
}
return $translated;
}

add_filter( ‘gettext’, ‘ee_maximum_tickets_messaging_ticket_selector’, 10, 3 );

// move the date and time above the ticket selector

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’ );
}

/* End of website customizations*/
?>

I’ve activated the plugin in both the dev:
http://sandbox.cannabistrainers.com/event-registration/

and live sites

http://cannabistrainers.com/event-registration/

With the same results.

Please advise, thank you for your help


Tony

  • Support Staff

August 11, 2015 at 1:52 pm

Hi Maureen,

That snipped moves the ticket selector to the bottom of the content for the single event view, for example if you click on the name of one of the events:

http://cannabistrainers.com/events/sell-smart-responsible-vendor-program-922/

How are you listing the events on the event-registration page currently?


Maureen McNamara

August 11, 2015 at 4:58 pm

That’s good for that page with the individual listing.

Original Question:
On this page:
http://sandbox.cannabistrainers.com/event-registration/

The listing are displayed using shortcodes:
[ESPRESSO_EVENTS title=”ServSafe® Certification” category_slug=”servsafe”][ESPRESSO_EVENTS title=”Sell-SMaRT™ Training” category_slug=”sellsmart”]

Same issue how to move the date/time, which are in an odd location, to a spot that makes sense. Preferably above the ticket selector section below the title.

Thanks for your help


Tony

  • Support Staff

August 12, 2015 at 8:31 am

Changing the layout of the shortcode output needs to be done using the template files.

You’ll need to grab a copy of the template files from /event-espresso-core-reg/public/Espresso_Arabica_2014

Copy content-espresso_events.php & loop-espresso_events.php

Place those files within /wp-content/uploads/espresso/templates/

Within that location edit the content-espresso_events.php file.
Lines 46-51 is the order for that output – http://take.ms/oxSg2

Move this call:

<?php espresso_get_template_part( 'content', 'espresso_events-datetimes' ); ?>

To above the espresso_events-tickets template call, like this – http://take.ms/rJBXO

That will change the output to something like this – http://take.ms/xaqrs

Alternatively you can just disable the datetime output for that view (you will still see it if you click through to the event) via Event Espresso -> Events -> Templates -> Display Datetimes.

Set that to no and save the settings to remove the datetimes completely.


Lorenzo Orlando Caum

  • Support Staff

November 18, 2015 at 8:45 am

Hello again Maureen,

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

http://eventespresso.com/wiki/how-to-back-up-your-site/

You can see the change log for Event Espresso 4 here:

http://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


Lorenzo

The support post ‘EE4 move event-registration listing date and time’ 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.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Lorenzo Orlando Caum 4 years ago ago

Topic Tags

Notifications

This topic is: not resolved
Do NOT follow this link or you will be banned from the site!