Posted: May 26, 2016 at 4:53 am
|
I’d like to show an icon in the Event Calendar saying words to the effect “Not Open” when the event status is Not Open, instead of showing the default icon of “Enter Now” I suspect I only need to add a line or 2 of code to this file wp-content/plugins/custom-templates/templates/events-table/template.php and upload the icon I’d like to use? Thanks |
Hi Angus, I’ll assume you mean the Event Table and not the calendar? If so here’s the basic code changes you’d make to the event table template: 1) Right after the start of the loop (the start of the loop being
2) The following line of code will start with $button_text = $not_open ? ‘Not Open’ : __(‘Register’, ‘event_espresso’); 3) You substitute ‘Not Open’ for some html that can be used to show the icon. You may also need to tweak the line of code that starts with $live_button as well. |
|
|
the code now looks like this:
but nothing has changed on the calendar table. It looks the same and appears to function the same too. So, tweak the $live_button line how? This one:
Thanks
|
Is for the ‘Events Table’ and not the ‘Event Calendar’ or ‘Calendar table’. Can you link us to the page you that shows the output you want to edit so we can confirm which template you are editing please? |
|
|
I meant to include that for you! http://supersportsevents.me/ However, that may not help! The developers used this file “Event espresso add on for calendar template” (wp-content/plugins/wdm_venue/wdm_venue.php) to create a new template due to some changes we asked them to make. The shortcode on the page above is for “wdm-calendar-table”. The wdm file appears to be based on this file wp-content/plugins/espresso-template-calendar-table/index.php So I think that is the template I need to change. At the moment, the template I changed, based on matching the code snippet, was “Default events-table template” which was here wp-content/plugins/custom-templates/templates/events-table/template.php However, I’m waiting for Lorenzo to get to us about a gateway development, and if that is positive we’ll be upgrading to EE4, so this may be not worth pursuing if we’re going to spend too much time working out which file to edit! Thanks |
I don’t know how that dev has made the changes so really can’t say which template it will be. Normally I would say it would be:
But again I don’t know anything about that customization so it really could be any. (Lots of ways to achieve the same result) You can add a simple echo:
To each template, load the page and search the source for ‘testing’ to find if it loads. |
|
|
Thanks |
The support post ‘EE3 Event Status "Not Open" – possible to change icon in calendar to show this?’ 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.