I would like to get manufacturer name for each items on category pages.
Do you have any suggestions?
Solved! Go to Solution.
Edit below file
app/design/frontend/CUSTOM/THEME/Magento_Catalog/templates/product/list.phtml
$attribute = $_product->getResource()->getAttribute('attribute_code');
// Get Value
$attributeValue = $attribute->getFrontend()->getValue($_product);
// Get Label
$attributeLabel = $attribute->getStoreLabel();
Note: Make sure “Visible on Product View Page on Front-end” and “Used in Product Listing” options under storefront Properties are set to Yes.
In the product grid?
Edit below file
app/design/frontend/CUSTOM/THEME/Magento_Catalog/templates/product/list.phtml
$attribute = $_product->getResource()->getAttribute('attribute_code');
// Get Value
$attributeValue = $attribute->getFrontend()->getValue($_product);
// Get Label
$attributeLabel = $attribute->getStoreLabel();
Note: Make sure “Visible on Product View Page on Front-end” and “Used in Product Listing” options under storefront Properties are set to Yes.