To define a .php block class or a .phtml template that corresponds to a specific page area on your Magento 2 store you can use Template Path Hints.
In order to enable template path hints in Magento 2 follow the steps:
1. Make sure your Magento 2 is in the default or developer mode.
2. Go to Admin Panel > Stores > Settings > Configuration > Advanced > Developer > Debug.
3. Check and configure Developer Client Restrictions.
In this section set one or several IPs you want Template Path Hints to be available to. You can enable template path hints (next step), but still, you won't see them if in Allowed IPs there is some other IP entered.
This is done in case you want to look something up without disturbing other developers or customers as far as leaving this section empty will allow template path hints to everyone currently using the website.
4. Enable Template Path Hints.
Choose whether you want it to be enabled for StoreFront or Admin. Select Yes in the Add Block Names to Hints select box in case you want template path hints to show a block PHP class name additionally to PHTML template file path.
5. Once you have finished don't forget to press the Save Config button.
6. Before using Template Path Hints we recommend you to make sure that Magento block cache, page cache are disabled.
Now you are ready to reload a page to see which blocks on a page are referred to which PHP/PHTML files.