Skip to content

How to add an element under each product name on category pages?

How to add a subtitle / simple HTML element under each product name on a category page list?

I’ve tried various solutions via adding referenceContainers to the catalog_category_view.xml in my module and trying to target the various elements however never seem to be able to get the correct location.

For example:

        <referenceBlock name="category.products.list">
            <block class="MyModuleReviewsBlockProductSubtitle" name="product.subtitle"
                template="MyModule::product/subtitle_element.phtml"
                after="product.name" />
        </referenceBlock>

I want to do this in a way that doesn’t involve overwriting the entire default magento list.phtml file.

None of the various hooks that I have tried to achieve this. Developing with magento 2.4.6.

Thanks