I'm trying to remove the category from the product page title but I somehow can't get it to work.

Could anyone of you possibly help me ?

It says TITLE and then it displays the category

It says TITLE and then it displays the category

I was trying to remove

 <h1 class="title"><span><?php echo $this->getLayout()->getBlock('head')->getTitle(); ?></span></h1>

From the breadcrumbs.phtml but it removes the whole thing.

Thanks in advance


  • I would search .phtml files for a unique class/id surrounding the content you want to remove to find out what file it generates from. There's always the css option as well.
    – jamil
    Jun 13, 2017 at 21:26
  • Thanks Email - I I did search in the phtml - the trouble is however that there is only one call ` <h1 class="title"><span><?php echo $this->getLayout()->getBlock('head')->getTitle(); ?></span></h1>` and when I remove this the entire text gets removed.
    – Armin
    Jun 14, 2017 at 9:47

1 Answer 1


Put below code into your breadcrumb.phtml file.

<?php foreach($crumbs as $_crumbName=>$_crumbInfo): ?>
    <?php if($_crumbInfo['last']): ?>
            $result =  $this->escapeHtml($_crumbInfo['label']);
            $resultorg = $this->escapeHtml($_crumbInfo['label']);
            if(strlen($result)>80) { 
                $result = substr($result, 0, 40); 
        <strong class="em-breadcrumbs-title"><?php echo $this->__($result);?><?php if(strlen($resultorg) > 40): ?> <?php echo $this->__(' ...');?><?php endif; ?></strong>        
    <?php endif; ?>
<?php endforeach; ?>

If Title is more than 40 then cut the string and display "..." after the Title.

I think this may be help.

enter image description here

  • Hi - It did not work unfortunately. All it did was adding another line of text below
    – Armin
    Jun 14, 2017 at 9:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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