UPDATE
Unfortunately layout updates have been removed from Magento since 2.3.4 and if your version is greater than this you will now have to make a specific layout update https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/xml-manage.html#create-cms-pageproductcategory-specific-layouts.
Please reach out to us if you need somebody to make custom layouts for you now this self service option has been removed.
For all examplesÂ
- replace block_namespace_here with a custom name for your block such as custom.product.message
- replace block_identifier_here with the block identifier
Add a static block after a product title
<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>
Add static block after product images on product page
<referenceContainer name="product.info.media"> <block class="Magento\Cms\Block\Block" name="block_namespace_here" after="-" > <arguments> <argument name="block_id" xsi:type="string">block_indentifier_here</argument> </arguments> </block> </referenceContainer>
Add static block before product images on product page
<referenceContainer name="product.info.media"> <block class="Magento\Cms\Block\Block" name="block_namespace_here" before="-" > <arguments> <argument name="block_id" xsi:type="string">block_indentifier_here</argument> </arguments> </block> </referenceContainer>
Add a static block to the main content of a product page
<referenceContainer name="main"> <block class="Magento\Cms\Block\Block" name="block_namespace_here" before="-"> <arguments> <argument name="block_id" xsi:type="string">block_indentifier_here </argument> </arguments> </block> </referenceContainer>
Remove the price / final price from a product page
<referenceBlock name="product.price.final" remove="true"/>
Remove Qty and Add to Cart from product page
<referenceBlock name="product.info.addtocart" remove="true"/>