Posted: June 13, 2017 at 12:10 pm
|
Hi Could anyone advise on how to add prices and available spaces on a ‘recurring events templates’ the post below has all I wanted to do. The 2 files supplied by ‘Josh’ works great, however, the example where ‘Elzette’ posts her code about adding prices and available spaces has been deleted. Any help will be greatly appreciated.
|
Hi there, There is actually a newer template for the recurring events, and it’s available as an add-on. You’ll note it displays pricing out-of-the-box. Here’s a link to its documentation: https://eventespresso.com/wiki/recurring-events-dropdown-template-add-on/ If you want to add the available spaces count to the newer template, here’s the PHP code that you can add:
|
|
|
Thanks Josh, I’ll take a look at the add-on. Thanks |
No idea. It appears that the bin got deleted or expired eventually. Elzette most likely copied code from the built-in event-list-display.php template to add the other information. |
|
|
I purchased the add-on as you suggested, could you please advise where to place the PHP code so the available spaces appear next to the dates within the dropdown? Currently I’ve got the available spaces code inside a table cell and it’s not quite right. Many thanks |
For that location within that template you’ll need slightly different code, you’re editing template.php right? Something like this: if ( $num_attendees < $e['reg_limit'] ) { $available_spaces = apply_filters('filter_hook_espresso_available_spaces_text', $e['event_id']); echo ' (' . $available_spaces . ' spaces available)'; } You can add that around line 104 like this - https://monosnap.com/file/rYRvRKjANdgkZfZ8Uu2zcrvRtHqpGD Make sure you are using a text editor such as SublimtText or NotePad++ and not a word processor such as MS Word. Note that when modifying the templates for that add-on can create a |
|
|
Thanks Tony, That’s perfect! |
The support post ‘More than one course for a event (2)’ 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.