We sacrifice by not doing any other technology, so that you get the best of Magento.

We sacrifice by not doing any other technology, so that you get the best of Magento.

    If you need a custom meta tag for a specific product page in Magento 2

    Step 1: Go to the below-given path.

    appdesignfrontendMagemonkeysCustomthemeMagento_Cataloglayoutcatalog_product_view.xml

    <?xml version="1.0"?>
    <page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <body>
            <referenceBlock name="head.additional">
                <block class="MagentoCatalogBlockProductView" name="meta_type_name" template="Magento_Catalog::product/view/custom_meta_name.phtml" />
            </referenceBlock>
         </body>
    </page>

    Step 2: Create a file named custom_meta_name.phtml at the following path

    appdesignfrontendMagemonkeysCustomthemeMagento_Catalogtemplatesproductview

    Finally, add the below code

    <meta property="og:your_custom_tag_name" content="your_custom_value" />

     

     

    Fill the below form if you need any Magento relate help/advise/consulting.

    With Only Agency that provides a 24/7 emergency support.

      Get a Free Quote