Edit WordPress Email Templates in the Customizer

photo credit: Paper Plane – (license)

Argentinian WordPress developer Damian Logghe had never touched the Customizer API, but with all the controversy swirling around it, he decided to jump in to see what all the fuss was about.

“The customizer has been making a lot of noise lately, as we all know, bringing politics to WordPress, and by politics I mean people arguing but getting nowhere,” he said.

“As a plugin developer I never coded with the customizer and I only used it as a front end user. But at the latest WordCamp Buenos Aires, Elio Rivero spoke about using the customizer in plugins, and I decided to give it a try instead of entering into debate. And you know what? I loved it!”

Logghe was contracted to build a new WordPress site and was looking for an easy way to beautify WordPress’ default emails. He thought that the customizer would be the best choice for the job. After a week of development, he created Email Templates, the first plugin to enhance WordPress email templates using the customizer.

Email Templates can be accessed under the Appearance menu. The plugin creates customizer panels for editing the template, email header, footer, and settings. It even includes the ability to send a test email.

Adding a logo to the top of your email template is as easy as uploading an image. You can also customize the alignment, background color, and header text. The plugin includes panels for changing the “from name” and “from email”, footer text, and basic template styles.

After you finish your customizations, you can fire off a test email to see how the new template looks in your inbox. I tested the plugin and found that it works as advertised. Ordinarily, customizing WordPress’ default email template is not something your average user would attempt to do. The Email Templates plugin makes this accessible to anyone.

Building with the Customizer API has solidified Logghe’s belief in its potential for the future of WordPress. His example of live previewing email templates is a creative use of the API in the context of a plugin.

“In my opinion, the customizer is the right choice for every design change,” he said. “The API is extremely easy to use and previewing changes on the fly makes it awesome for every end user.

“It is just matter of time until the waters get calm and everyone migrates to it. In a year or so, editing your theme without the customizer is going to feel strange.”