Add Magento Category Links to your Footer Template

New Wave New Thinking

A useful bit of code for those who want to start optimising their website towards visitors and importantly Google for great SEO.

In your footer template file add the following code snippet where you want to display a list of your Magento categories.

app/design/frontend/default/your_theme/template/page/html/footer.phtml

<ul>

<?php $helper = $this->helper(‘catalog/category’) ?>

<?php foreach ($helper->getStoreCategories() as $_category): ?>

<li><a href=”<?php echo Mage::getModel(‘catalog/category’)->setData($_category->getData())->getUrl(); ?>” title=”<?php echo $_category->getName() ?>”><?php echo $_category->getName() ?></a></li>

<?php endforeach ?>

</ul>

View original post

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s