{"id":2113,"date":"2024-11-05T15:57:39","date_gmt":"2024-11-05T13:57:39","guid":{"rendered":"https:\/\/plumrocket.com\/learn\/?p=2113"},"modified":"2026-08-19T13:39:57","modified_gmt":"2026-08-19T10:39:57","slug":"how-to-customize-product-page-layout-in-magento-2","status":"publish","type":"post","link":"https:\/\/plumrocket.com\/learn\/magento-2-customize-product-page","title":{"rendered":"How to Customize Product Page Layout in Magento 2"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large disable_zoom\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"384\" src=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-1-1024x384.png\" alt=\"\" class=\"wp-image-2114\" srcset=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-1-1024x384.png 1024w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-1-300x113.png 300w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-1-768x288.png 768w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-1-1536x576.png 1536w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-1-1568x588.png 1568w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-1.png 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Often, websites need tailored design solutions to create a user-friendly website that makes sales. However, pre-built modules or themes can\u2019t always fulfill all the website\u2019s needs and create a seamless user experience. In such cases, the best decision is customization.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">One of the most frequent requests is to customize the Magento 2 product page. This can be done in two ways: by creating a custom module or a custom theme. While both methods are useful and effective, this tutorial will focus on the second method. Using a custom theme is often the best option if the primary goal is to alter the arrangement, style, and general look of your product pages.<\/p>\n\n\n\n<div class=\"wp-block-cover is-light\" style=\"min-height:30px;aspect-ratio:unset;\"><span aria-hidden=\"true\" class=\"wp-block-cover__background has-background-dim-100 has-background-dim\" style=\"background-color:#ebefff\"><\/span><div class=\"wp-block-cover__inner-container is-layout-flow wp-block-cover-is-layout-flow\">\n<p style=\"margin-left: -30px; margin-bottom: 0px\" class=\"has-dark-gray-color has-text-color\">Unlock the full potential of your store with tailored <a href=\"\/magento-development\" target=\"_blank\" rel=\"noreferrer noopener\" style=\"color:#0073aa;\">Magento development services<\/a> that meet your unique needs.<\/p>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1. Create Custom Theme in Magento 2<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">So, let&#8217;s create a custom theme to customize the product page.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Create directories with the following path: <code class=\"\" data-line=\"\">&lt;em&gt;app\/design\/&lt;Vendor_name&gt;\/&lt;Theme_name&gt;&lt;\/em&gt;<\/code>.<\/li>\n\n\n\n<li>Create two files in the directory: <code class=\"\" data-line=\"\">theme.xml<\/code> and <code class=\"\" data-line=\"\">registration.php<\/code><\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Here is the code for the <code class=\"\" data-line=\"\">theme.xml file<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-php\" data-line=\"\">&lt;?xml version=&quot;1.0&quot;?&gt;\n&lt;theme xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation=&quot;urn:magento:framework:Theme\/etc\/theme.xsd&quot;&gt;\n    &lt;title&gt;Custom Theme&lt;\/title&gt;\n    &lt;parent&gt;Magento\/luma&lt;\/parent&gt;\n&lt;\/theme&gt;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Below is the code for the <code class=\"\" data-line=\"\">registration.php<\/code> file:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-php\" data-line=\"\">&lt;?php\n\\Magento\\Framework\\Component\\ComponentRegistrar::register(\n    \\Magento\\Framework\\Component\\ComponentRegistrar::THEME,\n    &#039;frontend\/Plumrocket\/Custom_Theme&#039;,\n    __DIR__\n);\n<\/code><\/pre>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li>Execute the following command:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-php\" data-line=\"\">php bin\/magento setup:upgrade<\/code><\/pre>\n\n\n\n<ol start=\"4\" class=\"wp-block-list\">\n<li>Apply the new custom theme by going to <strong>Content -> Configuration<\/strong> in the admin panel and selecting the desired store view.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1206\" height=\"384\" src=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-1-1.png\" alt=\"Step 1: Apply the new custom theme\" class=\"wp-image-2121\" srcset=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-1-1.png 1206w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-1-1-300x96.png 300w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-1-1-1024x326.png 1024w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-1-1-768x245.png 768w\" sizes=\"auto, (max-width: 1206px) 100vw, 1206px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2. Enable Template Path Hints<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">First of all, in order to customize the Magento 2 product page, you need to enable path hints.in\/magento setup:upgra Path hints is a debugging tool that visually displays the paths to the layout and templates files used to render a page. This significantly reduces the time spent searching for the desired layout\/template file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can enable path hints by following these steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>In the Magneto admin panel, go to <strong>Stores > Configuration > Advanced > Developer<\/strong>.<strong>\u00a0<\/strong><\/li>\n\n\n\n<li>Under the \u2018Debug\u2019 tab, set the \u201c<strong>Enable Template Path Hints for Storefront\u201d <\/strong>to<em> Yes<\/em>.<\/li>\n\n\n\n<li>Click the Save Config button<em>.\u00a0<\/em><\/li>\n\n\n\n<li>Clear the cache via <strong>System > Cache Management > Flush Cache Storage<\/strong> or by using the <code class=\"\" data-line=\"\">php bin\/magento cache:flush<\/code> command.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">This is what the product page will look like with path hints enabled:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1206\" height=\"609\" src=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-2.png\" alt=\"Step 2: what the product page will look like\" class=\"wp-image-2122\" srcset=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-2.png 1206w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-2-300x151.png 300w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-2-1024x517.png 1024w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-2-768x388.png 768w\" sizes=\"auto, (max-width: 1206px) 100vw, 1206px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3. Customize Product Page in Magento 2 Using Layout File<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">There are 2 methods to customize the Magento 2 product page using the layout file: override the existing layout or create a custom product layout file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Depending on the product pages you need to customize, both methods require you to create xml files, and their names may contain a specific product type: <code class=\"\" data-line=\"\">catalog_product_view_type_&lt;em&gt;product_type&lt;\/em&gt;.xml<\/code>. Instead of <code class=\"\" data-line=\"\">product_type<\/code>, you need to enter the product type you&#8217;re customizing. Possible options: simple, configurable, grouped, downloadable, bundle, virtual.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, you can modify the product page not only by its type but also by ID or SKU. All you need to do is specify this ID\/SKU in the file name. For example, to customize the product page with SKU MH07, you need to create a file named <code class=\"\" data-line=\"\">catalog_product_view_sku_MH07.xml<\/code>, and for the product page with ID 10, the file name would be <code class=\"\" data-line=\"\">catalog_product_view_id_10.xml<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Method 1. Overriding layout to customize product page<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s move from theory to practice. Let\u2019s customize product page for all products, placing the Add to Cart button near the product price and removing the Add to Wish List and Add to Compare buttons:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Create the file <code class=\"\" data-line=\"\">app\/design\/frontend\/Plumrocket\/Custom_Theme\/Magento_Catalog\/layout\/catalog_product_view.xml<\/code>:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-php\" data-line=\"\">&lt;?xml version=&quot;1.0&quot;?&gt;\n&lt;page xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation=&quot;urn:magento:framework:View\/Layout\/etc\/page_configuration.xsd&quot;&gt;\n    &lt;body&gt;\n        &lt;move element=&quot;product.info.addtocart.additional&quot; destination=&quot;product.info.main&quot; after=&quot;product.info.price&quot; \/&gt;\n        &lt;referenceBlock name=&quot;product.info.addto&quot; remove=&quot;true&quot; \/&gt;\n    &lt;\/body&gt;\n&lt;\/page&gt;\n<\/code><\/pre>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li>Clear the cache and check the result.\u00a0<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Here is the page before customization:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1206\" height=\"613\" src=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-3.png\" alt=\"Step 3: the page before customization\" class=\"wp-image-2123\" srcset=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-3.png 1206w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-3-300x152.png 300w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-3-1024x520.png 1024w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-3-768x390.png 768w\" sizes=\"auto, (max-width: 1206px) 100vw, 1206px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Below the page after customization:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1206\" height=\"568\" src=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-4.png\" alt=\"Step 3: the page after customization\" class=\"wp-image-2124\" srcset=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-4.png 1206w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-4-300x141.png 300w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-4-1024x482.png 1024w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-4-768x362.png 768w\" sizes=\"auto, (max-width: 1206px) 100vw, 1206px\" \/><\/figure>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li>To remove the Add to cart button for the product with SKU MH07, you should create the file <code class=\"\" data-line=\"\">app\/design\/frontend\/Plumrocket\/Custom_Theme\/Magento_Catalog\/layout\/catalog_product_view_sku_MH07.xml<\/code>:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-php\" data-line=\"\">&lt;?xml version=&quot;1.0&quot;?&gt;\n&lt;page xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation=&quot;urn:magento:framework:View\/Layout\/etc\/page_configuration.xsd&quot;&gt;\n    &lt;body&gt;\n        &lt;referenceBlock name=&quot;product.info.addtocart.additional&quot; remove=&quot;true&quot; \/&gt;\n    &lt;\/body&gt;\n&lt;\/page&gt;\n<\/code><\/pre>\n\n\n\n<ol start=\"4\" class=\"wp-block-list\">\n<li>Clear the cache and check the result:<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1206\" height=\"420\" src=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-5.png\" alt=\"Step 3: clear the cache and check the result\" class=\"wp-image-2125\" srcset=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-5.png 1206w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-5-300x104.png 300w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-5-1024x357.png 1024w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-5-768x267.png 768w\" sizes=\"auto, (max-width: 1206px) 100vw, 1206px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Method 2. Creating custom layout to customize product page from admin panel<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This method involves creating a custom layout that can be enabled\/disabled from the admin panel. This allows the administrator to flexibly customize the product page directly from the admin panel. All you have to do is to create the <code class=\"\" data-line=\"\">app\/design\/frontend\/Plumrocket\/Custom_Theme\/Magento_Catalog\/layout\/catalog_product_view_selectable__.xml<\/code> file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, let\u2019s customize the product page with SKU MP03:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Create  the <code class=\"\" data-line=\"\">app\/design\/frontend\/Plumrocket\/Custom_Theme\/Magento_Catalog\/layout\/catalog_product_view_selectable_MP03_custom.xml<\/code> file:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-php\" data-line=\"\">&lt;?xml version=&quot;1.0&quot;?&gt;\n&lt;page xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation=&quot;urn:magento:framework:View\/Layout\/etc\/page_configuration.xsd&quot;&gt;\n    &lt;body&gt;\n        &lt;referenceBlock name=&quot;product.info.review&quot; remove=&quot;true&quot;\/&gt;\n    &lt;\/body&gt;\n&lt;\/page&gt;\n<\/code><\/pre>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li>Go to <strong>Catalog > Products<\/strong> and go to the product settings with SKU MP03. A new option has appeared in the \u201cCustom Layout Update\u201d field under the Design section.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1206\" height=\"428\" src=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-6.png\" alt=\"Step 3: a new option has appeared\" class=\"wp-image-2126\" srcset=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-6.png 1206w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-6-300x106.png 300w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-6-1024x363.png 1024w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-6-768x273.png 768w\" sizes=\"auto, (max-width: 1206px) 100vw, 1206px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If you don\u2019t see it, try changing the Scope to the one that your custom theme applies to.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1206\" height=\"267\" src=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-7.png\" alt=\"Step 3: change the Scope\" class=\"wp-image-2127\" srcset=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-7.png 1206w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-7-300x66.png 300w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-7-1024x227.png 1024w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-7-768x170.png 768w\" sizes=\"auto, (max-width: 1206px) 100vw, 1206px\" \/><\/figure>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li>Let&#8217;s change the value of the Custom Layout Update field to <em>custom<\/em>:<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Now, you can go to a storefront and see the result. Here is the Product page view without the custom layout update:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1206\" height=\"400\" src=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-8.png\" alt=\"Step 3: the Product page view without the custom layout update\" class=\"wp-image-2128\" srcset=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-8.png 1206w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-8-300x100.png 300w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-8-1024x340.png 1024w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-8-768x255.png 768w\" sizes=\"auto, (max-width: 1206px) 100vw, 1206px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Here is the Product page view with a custom layout update:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1206\" height=\"513\" src=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-9.png\" alt=\"Step 3: the Product page view with custom layout update\" class=\"wp-image-2129\" srcset=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-9.png 1206w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-9-300x128.png 300w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-9-1024x436.png 1024w, https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-9-768x327.png 768w\" sizes=\"auto, (max-width: 1206px) 100vw, 1206px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">I hope you found this tutorial helpful! If you need any assistance with <a href=\"\/magento-development\" target=\"_blank\" rel=\"noreferrer noopener\">custom Magento development<\/a>, feel free to reach out to us.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Frequently Asked Questions (FAQ)<\/h2>\n\n\n\n<div class=\"schema-faq wp-block-yoast-faq-block\"><div class=\"schema-faq-section\" id=\"faq-question-1787134898397\"><strong class=\"schema-faq-question\"><strong>Why doesn&#8217;t my layout file appear in the Custom Layout Update dropdown?<\/strong><\/strong> <p class=\"schema-faq-answer\">Almost always the filename. Magento only picks up files that match the pattern exactly:<br><code class=\"\" data-line=\"\">catalog_product_view_selectable_&lt;SKU&gt;_&lt;name&gt;.xml<\/code><br>The SKU has to match the product exactly, including case and any dashes. The file has to sit in\u00a0<code class=\"\" data-line=\"\">Magento_Catalog\/layout\/<\/code>\u00a0inside your theme, not in the theme&#8217;s root\u00a0<code class=\"\" data-line=\"\">layout\/<\/code>\u00a0folder. And the theme that contains the file has to be the theme applied to the scope you are editing, which is why switching the Scope selector at the top of the product page often makes the option appear.<br>Flush the cache after adding the file. Magento reads the available options from the layout files on disk, so a stale cache hides new ones.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1787135313042\"><strong class=\"schema-faq-question\"><strong>What is the difference between remove=&#8221;true&#8221; and display=&#8221;false&#8221;?<\/strong><\/strong> <p class=\"schema-faq-answer\"><code class=\"\" data-line=\"\">remove=&quot;true&quot;<\/code>\u00a0takes the block out of the layout entirely, along with everything nested inside it. It is applied after all layout files merge, so it beats any instruction that tries to add the block back. Use it when you are certain nothing else depends on that block.<br><code class=\"\" data-line=\"\">display=&quot;false&quot;<\/code>\u00a0leaves the block in the layout but stops it rendering. Safer when other blocks reference it, and easier to reverse later.<br>The failure mode worth knowing: removing a parent block silently removes its children too. If part of the page disappears that you never touched, this is usually why. Turn on path hints and check what was nested inside the block you removed.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1787135347784\"><strong class=\"schema-faq-question\"><strong>Do I need a custom theme, or can I edit the Luma files directly?<\/strong><\/strong> <p class=\"schema-faq-answer\">Create a custom theme. Editing core theme files under\u00a0<code class=\"\" data-line=\"\">vendor\/<\/code>\u00a0works right up until the next update overwrites everything, and then you are rebuilding your changes from memory under time pressure.<br>A child theme takes about ten minutes to set up, as shown in Step 1, and every override you write afterwards lives in your own directory. It is the difference between a change you own and a change you rent.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1787135778925\"><strong class=\"schema-faq-question\"><strong>Does this work with Hyv\u00e4 themes?<\/strong><\/strong> <p class=\"schema-faq-answer\">Partly. Hyv\u00e4 still runs on Magento&#8217;s layout XML system, so the mechanism carries over: the same handles, the same\u00a0<code class=\"\" data-line=\"\">move<\/code>\u00a0and\u00a0<code class=\"\" data-line=\"\">referenceBlock<\/code>\u00a0instructions, the same selectable layout files.<br>What doesn&#8217;t carry over is everything specific to Luma. Templates, block names and styling are different, so the examples in this tutorial will not map one to one onto a Hyv\u00e4 storefront. Enable path hints on your own theme and confirm the block names before writing the override.<br>If you are moving to Hyv\u00e4 or already running it, our\u00a0<a href=\"\/hyva-theme-development\" type=\"link\" id=\"\/hyva-theme-development\" target=\"_blank\" rel=\"noreferrer noopener\">Hyv\u00e4 theme development team<\/a>\u00a0handles this kind of work daily.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1787135929656\"><strong class=\"schema-faq-question\"><strong>How do I apply a layout change to one store view only?<\/strong><\/strong> <p class=\"schema-faq-answer\">Through the theme, not the layout file. Layout overrides apply wherever their theme is applied, so scope the theme instead.<br>Go to\u00a0<strong>Content > Design > Configuration<\/strong>, find the row for the store view you want, and apply your custom theme there only. Other store views keep the parent theme and stay untouched. For a multi-language or multi-brand setup, that usually means one child theme per variation rather than one theme with conditional logic inside it.<\/p> <\/div> <\/div>\n","protected":false},"excerpt":{"rendered":"<p>Often, websites need tailored design solutions to create a user-friendly website that makes sales. However, pre-built modules or themes can\u2019t always fulfill all the website\u2019s needs and create a seamless user experience. In such cases, the best decision is customization.<\/p>\n<p>One of the most frequent requests is to customize the Magento 2 product page. This can be done in two ways: by creating a custom module or a custom theme. While both methods are useful and effective, this tutorial will focus on the second method. Using a custom theme is often the best option if the primary goal is to alter the arrangement, style, and general look of your product pages.<\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"footnotes":""},"categories":[125,121,123],"tags":[],"class_list":["post-2113","post","type-post","status-publish","format-standard","hentry","category-magento-catalog","category-magento-config","category-magento-frontend-dev-guide","entry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Customize Product Page Layout in Magento 2<\/title>\n<meta name=\"description\" content=\"Follow this step-by-step tutorial on how to customize product page layout in Magento 2 to tailor website design to your unique needs and boost sales.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/plumrocket.com\/learn\/magento-2-customize-product-page\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Customize Product Page Layout in Magento 2\" \/>\n<meta property=\"og:description\" content=\"Follow this step-by-step tutorial on how to customize product page layout in Magento 2 to tailor website design to your unique needs and boost sales.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/plumrocket.com\/learn\/magento-2-customize-product-page\" \/>\n<meta property=\"og:site_name\" content=\"Magento Tutorials for Beginners &amp; Professionals\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-05T13:57:39+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-08-19T10:39:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1600\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Yaroslav Panchyshyn\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Yaroslav Panchyshyn\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Customize Product Page Layout in Magento 2","description":"Follow this step-by-step tutorial on how to customize product page layout in Magento 2 to tailor website design to your unique needs and boost sales.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/plumrocket.com\/learn\/magento-2-customize-product-page","og_locale":"en_US","og_type":"article","og_title":"How to Customize Product Page Layout in Magento 2","og_description":"Follow this step-by-step tutorial on how to customize product page layout in Magento 2 to tailor website design to your unique needs and boost sales.","og_url":"https:\/\/plumrocket.com\/learn\/magento-2-customize-product-page","og_site_name":"Magento Tutorials for Beginners &amp; Professionals","article_published_time":"2024-11-05T13:57:39+00:00","article_modified_time":"2026-08-19T10:39:57+00:00","og_image":[{"width":1600,"height":600,"url":"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-1.png","type":"image\/png"}],"author":"Yaroslav Panchyshyn","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Yaroslav Panchyshyn","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/plumrocket.com\/learn\/magento-2-customize-product-page#article","isPartOf":{"@id":"https:\/\/plumrocket.com\/learn\/magento-2-customize-product-page"},"author":{"name":"Yaroslav Panchyshyn","@id":"https:\/\/plumrocket.com\/learn\/#\/schema\/person\/96ee7c2f8cd8a848a741f7d4bb902a53"},"headline":"How to Customize Product Page Layout in Magento 2","datePublished":"2024-11-05T13:57:39+00:00","dateModified":"2026-08-19T10:39:57+00:00","mainEntityOfPage":{"@id":"https:\/\/plumrocket.com\/learn\/magento-2-customize-product-page"},"wordCount":1260,"commentCount":0,"image":{"@id":"https:\/\/plumrocket.com\/learn\/magento-2-customize-product-page#primaryimage"},"thumbnailUrl":"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-1-1024x384.png","articleSection":["Magento Catalog","Magento Configuration","Magento Frontend Development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/plumrocket.com\/learn\/magento-2-customize-product-page#respond"]}]},{"@type":["WebPage","FAQPage"],"@id":"https:\/\/plumrocket.com\/learn\/magento-2-customize-product-page","url":"https:\/\/plumrocket.com\/learn\/magento-2-customize-product-page","name":"How to Customize Product Page Layout in Magento 2","isPartOf":{"@id":"https:\/\/plumrocket.com\/learn\/#website"},"primaryImageOfPage":{"@id":"https:\/\/plumrocket.com\/learn\/magento-2-customize-product-page#primaryimage"},"image":{"@id":"https:\/\/plumrocket.com\/learn\/magento-2-customize-product-page#primaryimage"},"thumbnailUrl":"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-1-1024x384.png","datePublished":"2024-11-05T13:57:39+00:00","dateModified":"2026-08-19T10:39:57+00:00","author":{"@id":"https:\/\/plumrocket.com\/learn\/#\/schema\/person\/96ee7c2f8cd8a848a741f7d4bb902a53"},"description":"Follow this step-by-step tutorial on how to customize product page layout in Magento 2 to tailor website design to your unique needs and boost sales.","breadcrumb":{"@id":"https:\/\/plumrocket.com\/learn\/magento-2-customize-product-page#breadcrumb"},"mainEntity":[{"@id":"https:\/\/plumrocket.com\/learn\/magento-2-customize-product-page#faq-question-1787134898397"},{"@id":"https:\/\/plumrocket.com\/learn\/magento-2-customize-product-page#faq-question-1787135313042"},{"@id":"https:\/\/plumrocket.com\/learn\/magento-2-customize-product-page#faq-question-1787135347784"},{"@id":"https:\/\/plumrocket.com\/learn\/magento-2-customize-product-page#faq-question-1787135778925"},{"@id":"https:\/\/plumrocket.com\/learn\/magento-2-customize-product-page#faq-question-1787135929656"}],"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/plumrocket.com\/learn\/magento-2-customize-product-page"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/plumrocket.com\/learn\/magento-2-customize-product-page#primaryimage","url":"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-1.png","contentUrl":"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2024\/10\/customize-product-page-layout-1.png","width":1600,"height":600},{"@type":"BreadcrumbList","@id":"https:\/\/plumrocket.com\/learn\/magento-2-customize-product-page#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Learn","item":"https:\/\/plumrocket.com\/learn"},{"@type":"ListItem","position":2,"name":"How to Customize Product Page Layout in Magento 2"}]},{"@type":"WebSite","@id":"https:\/\/plumrocket.com\/learn\/#website","url":"https:\/\/plumrocket.com\/learn\/","name":"Magento Tutorials for Beginners &amp; Professionals","description":"Plumrocket Inc","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/plumrocket.com\/learn\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/plumrocket.com\/learn\/#\/schema\/person\/96ee7c2f8cd8a848a741f7d4bb902a53","name":"Yaroslav Panchyshyn","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2025\/08\/avatar_user_8_1755699888-96x96.jpg","url":"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2025\/08\/avatar_user_8_1755699888-96x96.jpg","contentUrl":"https:\/\/plumrocket.com\/learn\/wp-content\/uploads\/2025\/08\/avatar_user_8_1755699888-96x96.jpg","caption":"Yaroslav Panchyshyn"},"description":"PHP developer specializing in Magento, dedicated to helping customers keep their stores running smoothly and always eager to discover new tools and solutions.","url":"https:\/\/plumrocket.com\/learn\/author\/yaroslav-panchyshyn"},{"@type":"Question","@id":"https:\/\/plumrocket.com\/learn\/magento-2-customize-product-page#faq-question-1787134898397","position":1,"url":"https:\/\/plumrocket.com\/learn\/magento-2-customize-product-page#faq-question-1787134898397","name":"Why doesn't my layout file appear in the Custom Layout Update dropdown?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"Almost always the filename. Magento only picks up files that match the pattern exactly:<br>catalog_product_view_selectable_&lt;SKU>_&lt;name>.xml<br>The SKU has to match the product exactly, including case and any dashes. The file has to sit in\u00a0Magento_Catalog\/layout\/\u00a0inside your theme, not in the theme's root\u00a0layout\/\u00a0folder. And the theme that contains the file has to be the theme applied to the scope you are editing, which is why switching the Scope selector at the top of the product page often makes the option appear.<br>Flush the cache after adding the file. Magento reads the available options from the layout files on disk, so a stale cache hides new ones.","inLanguage":"en-US"},"inLanguage":"en-US"},{"@type":"Question","@id":"https:\/\/plumrocket.com\/learn\/magento-2-customize-product-page#faq-question-1787135313042","position":2,"url":"https:\/\/plumrocket.com\/learn\/magento-2-customize-product-page#faq-question-1787135313042","name":"What is the difference between remove=\"true\" and display=\"false\"?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"remove=\"true\"\u00a0takes the block out of the layout entirely, along with everything nested inside it. It is applied after all layout files merge, so it beats any instruction that tries to add the block back. Use it when you are certain nothing else depends on that block.<br>display=\"false\"\u00a0leaves the block in the layout but stops it rendering. Safer when other blocks reference it, and easier to reverse later.<br>The failure mode worth knowing: removing a parent block silently removes its children too. If part of the page disappears that you never touched, this is usually why. Turn on path hints and check what was nested inside the block you removed.","inLanguage":"en-US"},"inLanguage":"en-US"},{"@type":"Question","@id":"https:\/\/plumrocket.com\/learn\/magento-2-customize-product-page#faq-question-1787135347784","position":3,"url":"https:\/\/plumrocket.com\/learn\/magento-2-customize-product-page#faq-question-1787135347784","name":"Do I need a custom theme, or can I edit the Luma files directly?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"Create a custom theme. Editing core theme files under\u00a0vendor\/\u00a0works right up until the next update overwrites everything, and then you are rebuilding your changes from memory under time pressure.<br>A child theme takes about ten minutes to set up, as shown in Step 1, and every override you write afterwards lives in your own directory. It is the difference between a change you own and a change you rent.","inLanguage":"en-US"},"inLanguage":"en-US"},{"@type":"Question","@id":"https:\/\/plumrocket.com\/learn\/magento-2-customize-product-page#faq-question-1787135778925","position":4,"url":"https:\/\/plumrocket.com\/learn\/magento-2-customize-product-page#faq-question-1787135778925","name":"Does this work with Hyv\u00e4 themes?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"Partly. Hyv\u00e4 still runs on Magento's layout XML system, so the mechanism carries over: the same handles, the same\u00a0move\u00a0and\u00a0referenceBlock\u00a0instructions, the same selectable layout files.<br>What doesn't carry over is everything specific to Luma. Templates, block names and styling are different, so the examples in this tutorial will not map one to one onto a Hyv\u00e4 storefront. Enable path hints on your own theme and confirm the block names before writing the override.<br>If you are moving to Hyv\u00e4 or already running it, our\u00a0<a href=\"\/hyva-theme-development\" type=\"link\" id=\"\/hyva-theme-development\" target=\"_blank\" rel=\"noreferrer noopener\">Hyv\u00e4 theme development team<\/a>\u00a0handles this kind of work daily.","inLanguage":"en-US"},"inLanguage":"en-US"},{"@type":"Question","@id":"https:\/\/plumrocket.com\/learn\/magento-2-customize-product-page#faq-question-1787135929656","position":5,"url":"https:\/\/plumrocket.com\/learn\/magento-2-customize-product-page#faq-question-1787135929656","name":"How do I apply a layout change to one store view only?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"Through the theme, not the layout file. Layout overrides apply wherever their theme is applied, so scope the theme instead.<br>Go to\u00a0<strong>Content > Design > Configuration<\/strong>, find the row for the store view you want, and apply your custom theme there only. Other store views keep the parent theme and stay untouched. For a multi-language or multi-brand setup, that usually means one child theme per variation rather than one theme with conditional logic inside it.","inLanguage":"en-US"},"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/plumrocket.com\/learn\/wp-json\/wp\/v2\/posts\/2113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/plumrocket.com\/learn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/plumrocket.com\/learn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/plumrocket.com\/learn\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/plumrocket.com\/learn\/wp-json\/wp\/v2\/comments?post=2113"}],"version-history":[{"count":12,"href":"https:\/\/plumrocket.com\/learn\/wp-json\/wp\/v2\/posts\/2113\/revisions"}],"predecessor-version":[{"id":3046,"href":"https:\/\/plumrocket.com\/learn\/wp-json\/wp\/v2\/posts\/2113\/revisions\/3046"}],"wp:attachment":[{"href":"https:\/\/plumrocket.com\/learn\/wp-json\/wp\/v2\/media?parent=2113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/plumrocket.com\/learn\/wp-json\/wp\/v2\/categories?post=2113"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/plumrocket.com\/learn\/wp-json\/wp\/v2\/tags?post=2113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}