How to change Related product title block in Magento

How to change Related product title block in Magento

July 29, 2026 · Illustrated author avatarBy Stefan Bogdanescu
How to change Related product title block in Magento

Hello everyone! Today we’re going to take a look at how to change the block title of the “Related Products” display in your Magento store. This is a common task for developers looking to customize the user interface.

Before we dive into the code, let’s briefly discuss why you might want to do this:

  • Branding: You may want to use your brand name or company tagline instead of the default title.
  • Personalization: Some stores prefer to display related products as “You Might Also Like” or another personalized message.

Whatever your reason, we’re here to guide you through the process. Let’s get started!

The Default Magento Theme Structure

First, it’s important to understand where the theme files are located. By default, these files can be found in:

app/design/frontend/<vendor>/<theme>/

Replace <vendor> with your theme vendor (e.g., ‘magento’ for the default Luma theme), and <theme> with the actual theme name you’re using.

Locating the XML Layout File

The “Related Products” title is defined in an XML layout file. In the case of the Luma theme, it’s located at:

app/design/frontend/magento/luma/Magento_Catalog/layout/catalog_product_view.xml

Open this file and look for the reference name="product.info.similar_products" line. This is where the block title is defined.

Changing the Title Block

To change the title, you need to modify the title attribute of the <block> element. It currently looks like this:

<block class="Magento\Catalog\Block\Product\AbstractProduct" name="product.info.similar_products" as="similar_products" template="Magento_Catalog::product/similar.phtml" ttl lifetime="28800">
    <arguments>
        <argument name="title" translate="true" xsi:type="string">Related Products</argument>
    </arguments>
</block>

To change the title to “You Might Also Like”, for example, you simply update it like this:

<block class="Magento\Catalog\Block\Product\AbstractProduct" name="product.info.similar_products" as="similar_products" template="Magento_Catalog::product/similar.phtml" ttl lifetime="28800">
    <arguments>
        <argument name="title" translate="true" xsi:type="string">You Might Also Like</argument>
    </arguments>
</block>

Save the file, and that’s it! Your “Related Products” title will now display as whatever text you’ve entered.

Testing the Change

To confirm your change is successful:

  1. Navigate to a product page in your store.
  2. Look for the “You Might Also Like” (or your custom title) heading above the related products list.

If everything has been set up correctly, it should now display your new title!

Conclusion

Changing the “Related Products” title block is a straightforward process once you understand where to make the change in the XML layout file. This simple modification can significantly enhance the user experience by making the website feel more personalized and cohesive with your brand.

Remember, if you’re using a custom theme, you’ll need to find the catalog_product_view.xml file within that theme’s folder structure. The process is identical once you locate it.

Don’t forget to check out other helpful Magento tutorials on Laravel Company. We cover a wide range of topics from installation guides to advanced customizations.

Happy coding, and I hope this guide has been useful for you!

Catalog Themes Import/Export

Our network