I want to add to get page title in title tag (of head ) i tried

<?php if ($_category->getMetaTitle()):?>
    <?php echo $_helper->categoryAttribute($_category, $_category->getMetaTitle(), 'meta_title') ?>
<?php else: ?

enter image description here

enter image description here


simply add this in your head

   echo  Mage::registry('current_category')->getMetaTitle();
}else {

 echo $this->getTitle()
  • Buy adding this code homepage title disn't display – Payal jhamta Aug 8 '16 at 12:11
  • @Payaljhamta added the code for that – Qaisar Satti Aug 8 '16 at 12:16
  • used this working<?php if(Mage::registry('current_category')) { echo Mage::registry('current_category')->getMetaTitle(); } else { echo $this->getTitle() ; } ?> – Payal jhamta Aug 8 '16 at 12:17

Magento, default take page title from page title from meta_title

You can see that Mage_Catalog_Block_Category_View , and you will understand that it taking from meta_title field,if that field have value for that particular category .

May be

  • your system have any extensions
  • Or customization
  • As you have multiple store_view/store then you did not set vale for your particular stores

You need to fix those. then it will work properly

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.