Categories: How ToMagento 2

How to Enable Template Path Hints in Magento 2

Making changes in Magento 2 file structure can be a tough cookie to crack as if you think you have searched for a perfect file to edit, you end up finding more to edit or modify them completely. Magento 2 contains different .phtml files from where the content on a page shows up.

To modify or edit any of the .phtml file content, one needs to locate desired file first. To ease up finding .phtml files to edit, template path hints in Magento 2 proves to be a helping hand for developers and designers.

Template Path Hints are little tags shown on your frontend stores which specifies the location of a particular code within the Magneto file structure.

Steps to turn on template path hints in Magento 2:

    1. Go to Magento 2 admin panel and login with your credentials.
    2. Go to Stores –> Configuration.
    3. Select Developer option from the Advanced tab at the end.

  1. Open Debug dropdown and set Enabled Template Path Hints for Storefront to yes.
  2. Click to Save Config.

Following above steps will show up template path hints to everyone who is on the frontend page. To specifically show template path hints on your computer, first of all you need to find IP address of your PC if you don’t know. Now in the “Developer Client Restrictions” tab enter your IP address in Allowed IPs option and save.

If everything is followed well, you can see template path hints enabled in Magento 2 store front.

Let me know how this blog helped you to find location of your files. Also leave your feedbacks and suggestions in comment section below. Queries are also welcomed, I would be happy to help.

Click to rate this post!
[Total: 9 Average: 4.4]
Gaurav Jain

Gaurav Jain is Co-Founder and Adobe Certified Expert-Magento Commerce Business Practitioner. Being Computer Engineer👨‍💻 and possessing Extensive Marketing skills he handles all kinds of customer Queries and his Happy😀 & Helping🙏 Nature makes customer's day Delightful. When he isn’t working, you’ll find Gaurav Reading on Books📖 or Traveling🚗. Also, he is Speaker at Magento Meetups.

View Comments

Recent Posts

Magento 2: Add Quantity Increment and Decrement on Category Page

Hello Magento Friends, In this blog, we will discuss about adding quantity increment and decrement…

14 hours ago

How to Integrate ChatGPT with Laravel Application?

In this guide, we'll explore how to integrate ChatGPT, an AI-powered chatbot, with a Laravel…

4 days ago

What are Net Sales? How to Calculate Your Net Sales?

In the world of business, understanding financial metrics is crucial for making informed decisions and…

6 days ago

Magento 2 Extensions Digest April 2024 (New Release & Updates)

Welcome to the MageComp Monthly Digest, where we bring you the latest updates, releases, and…

6 days ago

The ABCs of Geofencing: Definition, Features and Uses

In this era, businesses are always on the lookout for ways to engage with their…

7 days ago

How to Delete Product Variant in a Shopify Remix App using GraphQL Mutations?

Managing a Shopify store efficiently involves keeping your product catalog organized. This includes removing outdated…

1 week ago