Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-sales domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the better-click-to-tweet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-amazon domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-stats domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Seperate Template Tags For Month/Day | Event Espresso - Staging Server

Support

Home Forums Event Espresso Premium Seperate Template Tags For Month/Day

Seperate Template Tags For Month/Day

Posted: January 15, 2014 at 2:43 pm

Viewing 1 reply thread


Josiah Cole

January 15, 2014 at 2:43 pm

Is there a way to extract/print *just* the event month name (ex: January), and/or the event day individually?

The purpose being I want to create a custom layout of upcoming events and want to style and place separately the month and the day/date for each event.

I am using custom post types and a custom loop now to display the upcoming 5 events. I use the $event_date to display the date but it prints the entire string.

Is this possible?


Sidney Harrell

  • Support Staff

January 15, 2014 at 3:13 pm

If you are using the page_event_list.php template, look up at line 61, where the $event_date variable gets created:

$event_date = do_shortcode('[EVENT_TIME event_id="'.$event_id.'" type="start_date" format="l, F j, Y"]'); // change the date format if you so desire http://php.net/manual/en/function.date.php

You could put a couple lines in right after that to create $event_month and $event_day variables as well:

$event_month = do_shortcode('[EVENT_TIME event_id="'.$event_id.'" type="start_date" format="F"]');
$event_day = do_shortcode('[EVENT_TIME event_id="'.$event_id.'" type="start_date" format="j"]');
Viewing 1 reply thread

The support post ‘Seperate Template Tags For Month/Day’ 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.

Event Espresso - Staging Server