Show custom category attribute in Frontend Magento

Posted on 2013-01-16
Last Modified: 2016-03-02
I've added an attribute text field in Magento category admin page.

I'm trying to echo the value fromtend using this code:

<?php echo $_category->getMyAttribute() ?>

Open in new window

but its not visible. Is there a better way of doing this? I've checked the database under
EAV_attribute table and can see that it has been update and the text field is showing in the backend.
Question by:rafique12
  • 5
  • 2
LVL 42

Expert Comment

ID: 38782453

Author Comment

ID: 38782669
Thankyou, its is... sort of. I need to show category attribute instead of product attribute.
LVL 42

Expert Comment

ID: 38782846
what is the type of the custom attribute?
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.


Author Comment

ID: 38783016
Its a text field. I've called it nav_description as I want to show a short description under category navigation links on the frontpage.

<?php echo $_category->getNavDescription() ?>

Open in new window


Author Comment

ID: 38792737
There must be someone that knows how to do this?

I've tried almost every method but none allow me to display the value of a custom category attribute on the front end.

I've created a module made sure the EAV attribute has been updated with my new attribute. it is also showing in the backend but nothing in the front?!?!?!

Accepted Solution

rafique12 earned 0 total points
ID: 38839427
This solved my issue:


Author Closing Comment

ID: 38854276
Had to look around but found it in the end. Thanks for the help anyway!

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Introduction This article is intended for those who are new to PHP error handling (  It addresses one of the most common problems that plague beginning PHP develop…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now