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
How Can I Insert the Registration End Date Into my Template Files? | Event Espresso - Staging Server

Support

Home Forums Event Espresso Premium How Can I Insert the Registration End Date Into my Template Files?

How Can I Insert the Registration End Date Into my Template Files?

Posted: May 13, 2013 at 9:48 am

Viewing 7 reply threads


Jeanette Green

May 13, 2013 at 9:48 am

Hey there,

Could you tell me the exact shortcode I’d use to enter the Event Registration End Date into my themes template files please? I’ve found this ‘registration_end’ in your shortcode template variables, but not sure exactly what code I’d use. I don’t want a label or anything, I just want a way to post the end date.

If you could help, it would be much appreciated.

Andrew


Jonathan Wilson

  • Support Staff

May 13, 2013 at 3:36 pm

Hello Andrew,

You could add this code to your registration_page_display.php template file around line 44.

<?php echo “Registration ends on: ” . $reg_end_date; ?>

Be sure to move that file and the registration_page.php file to your wp-content/uploads/espresso/templates directory to prevent them from being overwritten during and upgrade.


Josh

May 13, 2013 at 4:00 pm

Or you can copy the registration_page_display.php file to your active WP theme folder, then you don’t need to copy registration_page.php anywhere.


Jeanette Green

May 13, 2013 at 4:56 pm

Hey Gents,

Many thanks for that. I’ve already copied my template files to the uploads folder, as I’ve made some quite significant layout changes to the registration_page_display.php file – you have just completed the final change id like to make by giving me the correct piece of code.

Thanks very much for taking time out of your day to help me out.

Andrew


Jonathan Wilson

  • Support Staff

May 14, 2013 at 7:52 am

You are very welcome, Jeanette. Glad we could help.

If you have time in your busy schedule, would you be so kind to visit this page to see how you can help us get the word out about Event Espresso?

http://staging.eventespresso.com/about/help-us-help-you-how-to-share-event-espresso/


Jeanette Green

May 14, 2013 at 12:45 pm

Thanks Jonathan. Another quick question, is there any way I can change the date format that that piece of code generates?

Currently it prints the date like 2013-05-31 – id like to print the date as 31 May 2013


Josh

May 14, 2013 at 1:28 pm

Hi Andrew,

You can use the PHP strtotime and date functions to convert and format the date. Here is a code example:

<?php 
  $my_reg_end = strtotime( $reg_end_date );
  $my_reg_end_display = date( 'd M Y ', $my_reg_end);
  echo "Registration ends on: " . $my_reg_end_display;
?>


Jeanette Green

May 14, 2013 at 1:33 pm

Ahh you legend. That did the job nicely. Thanks, Josh.

Andrew

Viewing 7 reply threads

The support post ‘How Can I Insert the Registration End Date Into my Template Files?’ 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