Support

Home Forums Event Espresso Premium Locate and modify the email message CSS

Locate and modify the email message CSS

Posted: May 20, 2021 at 10:14 am

Viewing 2 reply threads


bksiyengar

May 20, 2021 at 10:14 am

Hi there, I would like to see the css for the email messages, but can’t find the file in the plugin. Can someone please give me the location.

I found this post with steps on how to register the new css with updates.
https://eventespresso.com/topic/ee4-custom-message-template-how-to-link-to-custom-css-file/
Is this still the best way to make modifications?

I would prefer to simply enqueue a new css file as opposed to registering my own plugin or template files.

PS: This part of the documentation:

Enqueue your own styles or scripts via this hook (and just add the regular wp_enqueue_style() etc in your function):
AHEE__EE_Html_messenger__enqueue_scripts_styles
That should load any CSS scripts/styles AFTER the messages styles/scripts.

on https://eventespresso.com/wiki/how-to-create-a-custom-message-template/
is very confusing. An code example would be better.


bksiyengar

May 20, 2021 at 12:07 pm

I figured out the location of the files.


Tony

  • Support Staff

May 20, 2021 at 3:42 pm

Hi there,

Modifying the core files of the plugin is generally not a good idea, those modifications will be lost each time the plugin updates.

The thread you linked to above allows you to load your own custom CSS file within your theme (preferably a child theme) without modifying core, so yes, that would be the best way to do this.

That function replaces the original CSS file with your own.

PS: This part of the documentation: … is very confusing. An code example would be better.

I think the intention for that code was for a developer familiar with how WordPress plugins would normally enqueue scripts and styles as there is nothing out of the ordinary for that function, something like:


add_action(
    'AHEE__EE_Html_messenger__enqueue_scripts_styles',
    'tw_ee_enqueu_message_script_styles'
);
function tw_ee_enqueu_message_script_styles() {
    wp_register_style(
        'eea-custom-message-styles',
        get_stylesheet_directory_uri() . 'eea-custom-message-styles.css'
    );
    wp_enqueue_style('eea-custom-message-styles');
}

Allows you to register and enqueue a custom style from your theme’s root directory which will load after the original.

Viewing 2 reply threads

The support post ‘Locate and modify the email message CSS’ 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