Magento 1.9: Add custom attribute to category

Step 1. Init module
app/etc/modules/AT_CustomCatAttr.xml

Step 2. Create config
app/code/local/AT/CustomCatAttr/etc/config.xml

Step 3. Create SQL script
app/code/local/AT/CustomCatAttr/sql/add_category_attribute/mysql4-install-0.0.1.php

Make sure the filename and path match the version (0.0.1) and nodenames (add_category_attribute) of the config.xml from Step 2.

Optional
If you change anything in the module, you can update it with a new version number. In this case you’ll have to add a new SQL script with the correct filename (i.e. from 0.0.1 to 0.0.2):
mysql4-upgrade-0.0.1-0.0.2.php

If for some reason the changes don’t show and reinstalling/renaming the module doesn’t work, it’s because the add_category_attribute is added in the core_resource table. Delete that record from the database and try again; it should show up now.

To show the field on the frontend, do this:
getCurrentCategory()->getCustomAttribute()): ?>
    categoryAttribute($_category, $_customAttribute, 'custom_attribute') ?>


or this
echo $_category->getData("custom_attribute");