MAGENTO – Add logout button on header

Open header.phtml, add

 

<?php if (Mage::helper(‘customer’)->isLoggedIn() ): ?>
<a class=”logOut” href=”<?php echo Mage::helper(‘customer’)->getLogoutUrl(); ?>”><?php echo ‘Log OUT’; ?></a>
<?php endif; ?>

 

where you want the button appears.

The button have the “.logOut” class so you can style it with css.