I am using Magento 2.2 for my store. I have created a custom attribute. I have modified list.phtml and catalog_product_view.xml and I have created a myatrribute.phtml. I have also enabled visible in storefront to yes for the attribute.
I have done re-indexing and flushed the cache.
My attribute is showing in product view and category view. The attribute is not showing in the Homepage category list.
Any idea how I can enable the attribute in homepage category list.
My custom attribute phtml file:
<?php
echo $this->helper('Magento\Catalog\Helper\Output')->productAttribute($block->getProduct(), $block->getProduct()->getMunit(), 'munit');
?>