Magento 1.9.2.3 – Get Category Image to Front-End from Custom Attribute

categorymagento1.9.2.3

I have just created a custom attribute for categories through Attribute Manager, with attribute code category_view_img.

Now I can only put one image into a category, and use this image for both the banner and category-view-image on the home page. I want to use this custom attribute image on the home page as category view image. How can I get this image on front-end?

I am new to Magento and I don't have ideas how to do this, please assist. I am using Magento 1.9.2.3.

Best Answer

Use below code:

<?php $category = Mage::getModel('catalog/category')->load('category-id'); ?>
<img src="<?php echo $category->getCategoryViewImg(); ?> />