Custom notification email design

Solved5.16K viewsGeneral
0

Hi all!
Back at digging in AnsPress! I first would like to know which file is responsible for “designing” the notification emails we receive from AnsPress. Is Anspress using WP default email template? I’m using BuddyPress which has a dedicated email customizer and I would like to apply the same design to AnsPress mails for a better UX (nothing fancy, no picture, just some styling). What is the best way to do that?
Cheers!
Fred

Question is closed for new answers.
Selected answer as best

Just found a mention about “addons/email/template.html” and “addons/email/style.css” in class-helper.php. Should I add those files to be able to change the emails’ layout and design?

0

Hello Fred,

Just found a mention about “addons/email/template.html” and “addons/email/style.css” in class-helper.php. Should I add those files to be able to change the emails’ layout and design?

Yes, you have to edit this files.

Posted new comment

Hi Rahul!
Hope you’re doing fine. 😀 There are no such files yet. I can create them but do we have an example of template.php somewhere, even a very basic one?
Thanks and have a great day!

Me again! I just noticed a “Manage your notifications” link at the bottom of the email we receive from anspress.io: pretty neat! Is it part of your template.php or is it something you added via AnsPress Options > Email Templates?

You can find files here:
anspress-question-answertemplatesaddonsemail

Our emails are delivered by elasticemail.com. Which is a transactional email service provider.

Perfect, thanks!

Hi Rahul!
Working like a charm but I can’t succeed to override it from child theme. I created child-theme/anspress/templates/addons/email and put the files there but nothing happens. If I override the files directly in AnsPress directory, it’s working. How can I override from child theme?
Thanks in advance and have a nice week-end!

Hi Fred,
As I see in code here:
https://github.com/anspress/anspress/blob/master/addons/email/class-helper.php#L232
https://github.com/anspress/anspress/blob/master/addons/email/class-helper.php#L251
AnsPress is looking for file in child theme first. Please make sure file name are matching and try clearing your cache.
Thanks

Ok! So I don’t need the /templates/ subdirectory, just child-theme/anspress/addons/email.

Working now, thanks! Do you want me to add this to the documentation?

Oh yes, I missed templates part in your comment. It’s time for me to get spectacles 🙂

You are viewing 1 out of 1 answers, click here to view all answers.