Skip to content

How To Add an Email Link In WordPress? (In Post, Page, Menu, and Widget)

In this blog post, I am going to explore a simple yet effective technique for adding email links to your WordPress website.

I’ll be showing you three simple methods to achieve this.

But, there’s a twist – I’ll also explain why you might want to think twice before adding these email links.

Ready to get started? Let’s dive in!

Why Link an Email Address?

Linking an email address on your site enhances user experience by providing a quick and direct way for visitors to contact you.

By simply clicking the email link, users can immediately start drafting an email, saving them the time and effort of copying and pasting the address.

Method 1: Adding an Email Link in a Post or Page

  1. Choose Your Location: Decide whether you’re adding the email link to a post or a page. Let’s say we choose a post for this example.
  2. Inserting the Link: Adding an email link is quite similar to adding any regular hyperlink. Highlight the text where you want the link, click on ‘insert’, and then use the ‘mailto:’ prefix instead of ‘http://’ or ‘https://‘. For example, ‘mailto:[email protected]‘ creates a clickable email link.
A screenshot of a WordPress editor interface highlighting how to add an email link. Two annotations indicate steps in the process: (1) shows the linking tool in the editor's toolbar, and (2) shows a popup where the email address is entered with a "mailto:" prefix.

Method 2: Using HTML Code for Email Links

  1. Writing the HTML Code: If you want to add an email link to a sidebar or a specific area in your WordPress theme, you’ll need to use HTML code. This method involves typing out the full HTML code for the link.
  2. Copying and Pasting the Code: Copy this HTML code: <a href="mailto:[email protected]>Email me</a> (using Ctrl+C or Command+C) and paste it into the desired widget area, like the sidebar, in the ‘Appearance’ > ‘Widgets’ section of your dashboard, ideally into the Custom HTML block .
A close-up of a code editor window displaying HTML code. The code snippet is an anchor tag creating a mailto link, with the href attribute set to "mailto:email@address.com" and the link text "Email me".

Method 3: Adding a Clickable Email Link to Your Menu

  1. Accessing the Menu Customization: Go to the ‘Customize’ section in your WordPress dashboard and find the ‘Menus’ section.
  2. Using a Custom Link: In your menu settings, select ‘Add Items’ and then choose ‘Custom Link’. Replace the default ‘http://' with ‘mailto:’, followed by your email address. Set your link text, such as “Email me”, and click ‘Add to Menu’.
A screenshot of the WordPress menu interface under "Custom Links." It shows fields for entering the URL and Link Text for a custom navigation menu item. The URL field contains "mailto:email@address.com" and the Link Text field contains "Email me". There's a button labeled "Add to Menu" below the input fields.

Why You Might Reconsider Adding Email Links:

  1. Spam Vulnerability: Publicly visible email links are easy targets for email bots, leading to an unwanted influx of spam.
  2. User Experience Concerns: Many users may not prefer switching from their web browser to their email client to send an email. This inconvenience could deter them from contacting you.

Alternative Solution

Using Contact Forms: Instead of direct email links, consider using a contact form on your site. I recommend WPForms for its user-friendliness and effectiveness.

Testing Your Link

Once done, visit your site and test the link. Clicking it should open the default email application on your device, whether it’s a smartphone or a PC, ready to compose a message to the linked email address.

Conclusion

Adding email links to your WordPress site can be a straightforward process, but it’s important to weigh the pros and cons. Understanding these methods and their implications will help you make an informed decision about how to best facilitate communication with your audience.

Share the article on social media (all links open in a new tab)

Pinterest

If you enjoyed this article then please follow us on Twitter or Facebook.
You can also check out Salzburg, our modern personal blog theme that really makes a difference if you are serious about blogging.