Web Analytics

Fill the form & Get Installation Support





    Magento 2 product meta description override – how to use short description instead of product’s information?

    Currently, Magento allows you to use the Product related information to set as meta description in configuration settings but let’s say if you wish to use short description, then?

    Well, while working on a project I faced the above situation and fixed it like a pro 🙂

    If no Short Description is set in the product’s information use Magento’s configuration settings for the Meta Description.

    First, you have to add the below code in [Vendor Name]/[Module Name]/etc/events.xml in your existing module or create a new module:

    After that, you have to create a new observer file which you have mention in events.xml file like:

    [Vendor Name]\[Module Name]\Observer\SeoMetaObserver.php

    And add below code:

    Then flush the Magento cache and check the product page meta description tag.

    Fill the below form if you have any Magento programming need.





      Recent Articles

      Author Info

      Hire B. Darji

      Get a Free Quote





        Connect With Us