I have created a custom attribute named cloth material, and i want to display it in my Product LIST PAGE, and Product Details page Under my Price.
Can someone suggest me how to achieve it? The current blog posts are out dated. I am using Magento 2.3.3.
I also need to do it programmatically. When i do it by selecting Display on store catalog, it displays it under more details.
First, create catalog_product_view.xml in your custom theme. (If already there, then modify this file)
app/design/frontend/Vendor/theme/Magento_Catalog/layout/catalog_product_view.xml and add the below code in this file:
Now create cloth_material.phtml and add the below code in this file:
app/design/frontend/Vendor/theme/Magento_Catalog/templates/product/view/cloth_material.phtml and add the below code in this file: