Home Forums Event Espresso Premium Event Category Class

Event Category Class

Posted: June 8, 2020 at 7:40 am


June 8, 2020 at 7:40 am

I can see that a class is added for all events within a category of the type
‘espresso_event_categories-name’ and it is added to the <article> tag.

If there any way I can add this class ‘higher up’ i.e. add it to the <body> tag

thank you


  • Support Staff

June 8, 2020 at 8:59 am

Hi Phil,

Yes, you can use a function like this one:

Although to match what you are requesting you’ll need to change line 14 from:

$classes[] = 'category-' . $custom_term->slug;


$classes[] = 'espresso_event_categories-' . $custom_term->slug;

Then add that function to a custom functions plugin on the site, we have some documentation on creating one here:

You must be logged in to reply to this support post. Sign In or Register for an Account

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3 Documentation for Event Espresso 4

Status: publish

Updated by  Tony 1 month ago ago

Topic Tags


This topic is: not resolved
Do NOT follow this link or you will be banned from the site!