{"id":237,"date":"2018-11-16T09:45:33","date_gmt":"2018-11-16T09:45:33","guid":{"rendered":"https:\/\/meetanshi.com\/blog\/2018\/11\/16\/add-rename-remove-product-info-tabs-in-magento-2\/"},"modified":"2025-10-03T13:22:55","modified_gmt":"2025-10-03T07:52:55","slug":"add-rename-remove-product-info-tabs-in-magento-2","status":"publish","type":"post","link":"https:\/\/meetanshi.com\/blog\/add-rename-remove-product-info-tabs-in-magento-2\/","title":{"rendered":"How to Add, Rename and Remove Product Info Tabs in Magento 2"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Horizontal or vertical tabs on the product pages are a great way to organize extensive content data without increasing the page length. One can provide as much information for the same topic in a digestible manner by showing data from a single tab at a time. From the UX perspective, this helps in quick navigation without affecting SEO or website ranking. Magento 2 product pages are loaded with such informative product info tabs. By default, there are 3 product info tabs:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Details &#8211; It has the main product description<\/li>\n\n\n\n<li>More information &#8211; Having product attributes and values<\/li>\n\n\n\n<li>Review &#8211; Loaded with customer reviews and add the review section<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Many times, store owners need to add customized product info tab to show more product related information. Also, these tabs can be renamed with the easily recognizable name to refer the information purpose. And, after adding such customized Magento 2 product info tabs, they need to be removed Today, I have come up with the code to <strong><em>Add, Rename and Remove Product Info Tabs in Magento 2<\/em><\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Steps to Add, Rename and Remove Product Info Tabs in Magento 2:<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. Add Custom Magento 2 Product Info Tab<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">First of all, create a new attribute, name it as custom and add it to the default attribute set.<br>Create a new&nbsp;template file named <strong>custom-content.phtml <\/strong>and add below code to it.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;?php\n$_helper = $this->helper('Magento\\Catalog\\Helper\\Output');\n$_product = $block->getProduct();\n$_code = $block->getAtCode();\n$_className = $block->getCssClass();\n$_attributeLabel = $block->getAtLabel();\n$_attributeType = $block->getAtType();\n$_attributeAddAttribute = $block->getAddAttribute();\nif ($_attributeLabel &amp;&amp; $_attributeLabel == 'default')\n{\n    $_attributeLabel = $_product->getResource()->getAttribute($_code)->getFrontendLabel();\n}\n$_attributeValue = $_product->getResource()->getAttribute($_code)->getFrontend()->getValue($_product);\n?>\n\n&lt;?php if ($_attributeValue): ?>\n\n    &lt;div class=\"packaging-content\" &lt;?php echo $_attributeAddAttribute; ?>>\n        &lt;?php echo $_attributeValue; ?>\n\n    &lt;\/div>\n&lt;?php endif; ?><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now create&nbsp;<strong class=\"\">catalog_product_view.xml<\/strong> file and write below code.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"xml\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;?xml version=\"1.0\"?>\n&lt;page xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:framework:View\/Layout\/etc\/page_configuration.xsd\">\n    &lt;body>\n        &lt;referenceBlock name=\"product.info.details\">\n            &lt;block class=\"Magento\\Catalog\\Block\\Product\\View\\Description\"\n                   name=\"custom-content\"\n                   template=\"Vendor_Extension::custom-content.phtml\"\n                   group=\"detailed_info\">\n                &lt;arguments>\n                    &lt;argument name=\"at_call\" xsi:type=\"string\">getCustom&lt;\/argument>\n                    &lt;argument name=\"at_code\" xsi:type=\"string\">custom&lt;\/argument>\n                    &lt;argument name=\"css_class\" xsi:type=\"string\">custom&lt;\/argument>\n                    &lt;argument name=\"at_label\" xsi:type=\"string\">custom&lt;\/argument>\n                    &lt;argument name=\"add_attribute\" xsi:type=\"string\">itemprop=\"custom\"&lt;\/argument>\n                    &lt;argument name=\"title\" translate=\"true\" xsi:type=\"string\">Custom content&lt;\/argument>\n                &lt;\/arguments>\n            &lt;\/block>\n        &lt;\/referenceBlock>\n    &lt;\/body>\n&lt;\/page><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note:<\/strong> Replace &#8220;Vendor_Extension::custom-content.phtml&#8221; with the file you have created above.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you want to dynamically add product tabs or add tabs based on custom conditions, you may simply use the <a href=\"https:\/\/meetanshi.com\/magento-2-product-tabs.html\" target=\"_blank\" rel=\"noreferrer noopener\">Magento 2 Product Tabs<\/a> extension by Meetanshi and add unlimited custom tabs on the frontend.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. Rename Magento 2 Product Info Tab<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To&nbsp;rename the Description tab, go to&nbsp;<strong>app\/design\/frontend\/&lt;Theme&gt;\/Magento_Catalog\/layout\/catalog_product_view.xml<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"xml\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;?xml version=\"1.0\"?>\n&lt;page xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:framework:View\/Layout\/etc\/page_configuration.xsd\">\n    &lt;body>\n        &lt;referenceBlock name=\"product.info.details\">\n            &lt;referenceBlock name=\"product.info.description\">\n                &lt;arguments>\n                    &lt;argument name=\"title\" translate=\"true\" xsi:type=\"string\">New Description&lt;\/argument>\n                &lt;\/arguments>\n            &lt;\/referenceBlock>\n        &lt;\/referenceBlock>\n    &lt;\/body>\n&lt;\/page><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">3. Remove Magento 2 Product Tabs<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Remove the review tab and then write below code in <strong>catalog_product_view.xml<\/strong> file<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"xml\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;?xml version=\"1.0\"?>\n&lt;page xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:framework:View\/Layout\/etc\/page_configuration.xsd\">\n    &lt;body>\n        &lt;referenceBlock name=\"product.info.review\" remove=\"true\"\/>\n    &lt;\/body>\n&lt;\/page><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Hope you get the steps clearly. After implementing the above code, you can easily <strong><em>Add, Rename and Remove Product Info Tabs in Magento 2<\/em><\/strong>. You can use the separate code individually to serve your&nbsp;purpose.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Horizontal or vertical tabs on the product pages are a great way to organize extensive content data without increasing the page length. One can provide&#8230;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[34],"tags":[],"class_list":["post-237","post","type-post","status-publish","format-standard","hentry","category-magento"],"acf":[],"_links":{"self":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/237","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/comments?post=237"}],"version-history":[{"count":5,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/237\/revisions"}],"predecessor-version":[{"id":23107,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/237\/revisions\/23107"}],"wp:attachment":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/media?parent=237"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/categories?post=237"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/tags?post=237"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}