How to Add a Custom Message to Login Page in Magento 2?

How to Add a Custom Message to Login Page in Magento 2?

Magento is a leading eCommerce platform. The reason that most merchants prefer it is because of its customisation. Unlike other platforms, you can customise every aspect of your store in Magento. Speaking of customisations, one way to differentiate the login experience for your users is by adding a custom message.

This is a great way to communicate an important message to your users. For example, you may have recently added new products to your store or added a new feature. Rather than send promotional emails which usually stay unread, you can opt to communicate on the Magento login page, ensuring every logged in user reads it.

The best thing about Magento 2 customize login page is that you don’t need to get an extension for it. Magento offers built-in functionality for this very purpose. It’s pretty simple to create and display a custom message on the Magento 2 login page. Before listing the steps, lets discuss the benefits of a custom message on Magento login page.

Why Add a Custom Message on the Magento Login Page

Enhanced User Experience

One of the top reasons you must consider adding a custom message on the Magento login page is to enhance the user experience. For instance, a personalised greeting can go a long way in fostering brand loyalty. Likewise, reminders about any ongoing promotion or discounts can compel a user to engage with the store.

Communication

As mentioned earlier, you can use the login page to communicate important information to the users. For instance, new products, updates, or anything else which should be in the user’s knowledge.

Security Awareness

Just like any other business, online stores are faced with rising instances of fraud and hacking attempts. Therefore, it is imperative to provide awareness to the users. The login page is a perfect way to do so. You can add internal links to reliable resources on online security to inform users about the best practices.

Reduce Support Requests

Another reason you should focus on Magento 2 customize login page is to reduce the support requests. You can direct users to self-help resources from the login page. For example, how to check order status, reset the password or user name, and a lot more.

How to Customise Login Page in Magento 2

Step 1: Add a Block
  • Login to your Magento 2 admin panel.
  • On the left sidebar, click Content. Under Elements, click Blocks.
  • Click Add New Block on the upper right.
  • Fill in the fields as required. See the image as an example.
Add custom message to Magento 2 login page
  • Enter the following code in the HTML editor. You can modify the message according to your need.
Add custom message to Magento 2 login page
  • When you are done, click Save on the upper right corner.
Step 2: Add a Widget
  • On the left sidebar, click Content. Under Elements, click Widgets.
  • Click Add Widget in the upper right corner. You will see the following page.
Add custom message to Magento 2 login page
  • In the Type dropdown, select CMS Static Block.
  • In the Design Theme, select Magento Luma or the currently active theme.
  • Click Continue.
  • Under Storefront Properties, fill in the fields as required. See the image as an example.
Add custom message to Magento 2 login page
  • Now, under Layout Updates, click Add Layout Update.
  • Fill in the fields as below.
  • In the Display on box, select Specified Page.
  • In the Page dropdown, select Customer Account Login Form.
  • In the Container dropdown, select After Page Header or as you prefer.
Add custom message to Magento 2 login page
  • Under the Widget Options tab on the left side, select the recently created block.
Add custom message to Magento 2 login page
  • On the upper right corner, click Save and clear the cache.
That’s all you needed to do. Now, when a customer visits the login page, they will see the custom message as shown below. Add custom message to Magento 2 login page

Final Thoughts on Magento Login Page Customisation

This concludes our article on how to add a custom message in Magento 2 login page. Although the above steps are pretty straightforward, please don't hesitate to contact our Support team if you still get stuck anywhere or have any questions.

Other Articles You Might be Interested in: