Posted: February 19, 2016 at 11:17 am
|
I have searched through the help forums to try to figure out how to turn off the display of dates/times for some events and not others on the event listing page. If an event does not have a date I would like to display something like “Please Call for Information” instead. I was able to use CSS to turn off date/time on event detail page, but not on the listing page. |
You should be able to use something like:
to hide the date on the event list for a specific event (in the above example, the event’s ID is 12345). |
|
|
Josh, |
The first thing I can suggest is you don’t need to add any templates. You can use hooks instead. Another suggestion: You can use the Advanced Custom Fields plugin to add a toggle field to the event editor (ie Display Dates? Yes or No). Then, you can use the value that’s set from the Display Dates field in your own custom version of the espresso_list_of_event_dates() template tag. If you open up the espresso_list_of_event_dates() function in a code editor, you’ll see that it’s a pluggable function. So you can copy the function into the theme’s functions.php file or into your own custom plugin and add an if statement in there. |
|
|
OK Josh, |
Hi, you can remove this folder which is for the old version that may have been in use in the past: /wp-content/plugins/event-espresso-core-master 4.8.33 (current release) will be this folder: /wp-content/plugins/event-espresso-core-reg — |
|
|
DONE! Deleted the old version’s plugin which removed the folder. Also added the Custom field to the event page. |
You don’t edit any of the files in Event Espresso itself. Here’s the actual code of the function you’ll be working with: http://code.eventespresso.com/source-function-espresso_list_of_event_dates.html#467 It’s up to you where you want to add your if {} statement. You can add your custom code to a functions plugin or into your WordPress theme’s functions.php file. |
|
The support post ‘EE4 – Event list, turn off display of some dates/times but not others’ 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.