Unable to Get meta title on category page.
$this->getLayout()->getBlock('head')->getTitle();
Error:
Fatal error: Uncaught Error: Call to a member function getTitle() on boolean
Magento 2.3.0
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityUnable to Get meta title on category page.
$this->getLayout()->getBlock('head')->getTitle();
Error:
Fatal error: Uncaught Error: Call to a member function getTitle() on boolean
Magento 2.3.0
Try using these codes:
if(Mage::registry('current_category'))
{
echo Mage::registry('current_category')->getMetaTitle();
}else {
echo $this->getTitle()
}