Support

Home Forums Event Espresso Premium Default text for categories with no live event

Default text for categories with no live event

Posted: August 6, 2012 at 6:52 am


pmerrill

August 6, 2012 at 6:52 am

Hi,
I was wondering if there is anyway of displaying default text on Event Category pages if there are no events currently live in that category?
Thank you


Josh

  • Support Staff

August 6, 2012 at 11:20 am

The default text is “No events available”. This text string can be changed by making an English to English translation using the poEdit application, then uploading the .po and .mo files that poEdit generates when you save the language file. The language files in Event Espresso are in the /language folder of the plugin.

If you’d like to change this in the template, it is in event_list.php:

echo "<div id='event_content' class='event_content'>";
        if ( count($events) < 1) {
            //echo $sql;
            echo __('No events available...', 'event_espresso');
        }

Templates can be copied over to /wp-content/uploads/espresso/templates. There is more information in this guide: https://eventespresso.com/wiki/put-custom-templates/
Note that some templates need to be copied over in pairs. For example, if you make a change to event_list.php, you’ll need to copy over it’s counterpart event_list_display.php. Also please note that if we need to make a change to a template in version of Event Espresso, you’ll need to copy this change into your custom template to stay current with the plugin.

We recommend using Diffmerge to help merge changes into custom templates.


pmerrill

August 8, 2012 at 4:21 am

Thank you for this but I can’t find this line in event_list.php, or anything like it, is this a new addition?


Josh

  • Support Staff

August 8, 2012 at 8:55 am

The above posted code is in event_list.php on lines 201-205 of the current version (as of this writing 3.1.25.P) of Event Espresso.


pmerrill

August 9, 2012 at 3:27 am

Cheers for this, I just had to update the file.

The support post ‘Default text for categories with no live event’ 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