How to add a static block after a product title in Magento 2

1 min read

how-to-add-a-static-block-after-a-product-title-in-magento-2
  1. Create the static block you want to add after the title. When asked to give the block an identifier add something unique this will replace block_indentifier_here in the code below. 
  2. Use this code to add the block remembering to change the block identifier and giving the layout update a namespace such as custom.product.title.after
<referenceContainer name="product.info.main">  
            <block class="Magento\Cms\Block\Block" name="block_namespace_here" after="page.main.title">
                <arguments>
                    <argument name="block_id" xsi:type="string">block_indentifier_here</argument>
                </arguments>
            </block>
</referenceContainer>

Now you just need to style your contents that you’ve added to your CMS block.

The result of adding a static block after the product title is here on our Lumarix Magento Store

Before

Before adding layout update after product title in Magento 2

After

After adding layout update after product title in Magento 2

Uses for adding a static block after a product title in Magento 2

  • Stock message
  • Supply shortage
  • Special offer message
  • Link to instruction manaual
Chris Gee

Co-Founder & Managing Director

Chris is the embodiment of curiosity, innovation, and passion. Since establishing the company in 2012, he has been at the forefront of driving its vision and growth. Chris’s journey is marked by resilience and adaptability. His early years in sales and the experience of reviving a family-owned chain of music shops and an eCommerce store shaped his entrepreneurial spirit.

Today, Chris actively leads Rixxo, blending determination with cautious innovation, always keeping budgets and planning in mind. His expertise in eCommerce strategy plays a crucial role in driving our clients’ growth and online success. Chris also leads the UK chapter of the B2B eCommerce Association.

Away from the office, whether he’s cycling the open roads, cooking up a storm on the BBQ, or disassembling things to see how they work, his enthusiasm for understanding and exploring the world mirrors the ethos of the team he leads. More than just a leader; Chris is an integral part of the creative and inquisitive spirit that defines Rixxo.

Related blog posts

Want help choosing the best B2B eCommerce platform for your business?