John Crumpton

There are times when you want to hide Joomla’s breadcrumb, for example the homepage or search results.

In your template add the following where you want your breadcrumbs to appear:

<div id="breadcrumbs">
<?php
if ( ( $_REQUEST['option'] != "com_frontpage" ) and ( $_REQUEST['option'] != "com_search" ) and ( $_REQUEST['option'] != "com_xmap" ) ) { ?>
    <jdoc:include type="modules" name="breadcrumbs" />
     <?php } ?>
&nbsp;</div>

This hides the breadcrumb from the home page (com_frontpage) the search results (com_search) and the site map, in this case Xmap (com_xmap). Make sure your breadcrumb mobile appears in the “breadcrumb” module position.

To hide a specific page add:

 ( $_REQUEST['id'] != "8" )

Where 8 is the id of that page. You can also do this for a task as well as an option, just adjust $_REQUEST['option'] to $_REQUEST['task'].

Share:
  • Digg
  • del.icio.us
  • Facebook
  • LinkedIn
  • email
  • TwitThis
  • Alexandre
    Hi, I tried to hide the breadcrumbs but instead of hide now is showing twice.
    I think i´m doing something wrong. I added the code into the index.php in my template directory. Is this right ? In the instructions above firstly say to add the code to appear the breadcrumbs, following says that the code hides.

    K-mann, can you post your code again ?
  • Hi Alexandre - have you first removed the breadcrumbs code from your template? That may be why it's appearing twice. Is it appearing twice across all pages?
  • Alexandre
    John C. you are not from the future (J.Connor) but you are the guy. I looked everywhere a way to hide the breadcrumbs in the search page results.
    Thank you very much from Brazil.
  • K-mann
    Thanks a lot for your tip.
    I used your tip to hide search module when in "advanced search"

    It was very simple, here is my code:

    [code]






    [/code]

    Thanks again!
  • @K-mann thanks for the tip, could you email me the code as wordpress has removed it!
blog comments powered by Disqus