Support

Home Forums Event Espresso Premium Another icon and information on event list page

Another icon and information on event list page

Posted: July 14, 2020 at 4:19 pm

Viewing 8 reply threads


amweiss

July 14, 2020 at 4:19 pm

Right now, on the event listing page it shows the title, date and time, like this
https://paste.pics/ec550d7d2ab52aeba5f7181805e1407a
Is there any way to show another icon and bit of information – right below the time – for example, where I might say this event is online?

I’m using EE4


amweiss

July 14, 2020 at 4:50 pm

I should say the output is coming from this shortcode [ESPRESSO_EVENTS]


Tony

  • Support Staff

July 15, 2020 at 5:14 am

Hi there,

It is possible yes, there are hooks available within that output or you can also override the templates used.

However, we also have some options for what is displayed on the events lists within Event Espresso.

Go to Event Espresso -> Events -> Templates -> Event List Pages

We have a ‘status banner’ that displays the current status of an event next to the title which you can enable by setting ‘Display Status Banner’ on that section.

Does that work for you?


amweiss

July 15, 2020 at 7:58 am

Hi Tony…thanks..I tried the status banner approach but I think a hook would give me more control if this is possible. If it helps, here is the page that lists the events I’d like to add some information to
https://insight4peace.com/classes/
Thanks


Tony

  • Support Staff

July 15, 2020 at 8:54 am

Sure, if you want to add details right after the date you can use:

do_action( 'AHEE_event_details_after_event_date', $post );

Remember to use a is_archive() conditional to only output your additional details on the archives if needed.

EE hooks into the_content to inject the event details so another option it to add your details to that at a later priority.


amweiss

July 15, 2020 at 9:00 am

thanks…since I haven’t used hooks in awhile, could you give me a simple example if I wanted to say “Hello” on the line after the date?


Tony

  • Support Staff

July 15, 2020 at 9:14 am

Something like this:

add_action('AHEE_event_details_after_event_date', 'tw_ee_details_after_event_date_callback', 10, 1);
function tw_ee_details_after_event_date_callback($post) {
    echo 'Hello';
}

I recommend taking a look here for a refresher: https://www.smashingmagazine.com/2011/10/definitive-guide-wordpress-hooks/


amweiss

July 15, 2020 at 9:16 am

Great…thanks so much.


Tony

  • Support Staff

July 15, 2020 at 10:40 am

You’re most welcome.

Viewing 8 reply threads

The support post ‘Another icon and information on event list page’ 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