Last updated August 27, 2009. Created by Tommy Sundstrom on July 16, 2006.
Edited by ronald_istos, bryan kennedy, add1sun, Dublin Drupaller. Log in to edit this page.

Note: the better way to avoid this problem is to not use the blog module. Blog module is intended for a site with multiple blogs. For single-user blogs, using story or a custom content type is sufficient.

I'm the only one blogging at my website, so at my site the "blogs » user's blog" part of the breadcrumb is redundant (and a bit confusing).

To remove it, I've added this to template.php:

<?php
/**
* Remove links to individual blog from breadcrumbs.
*
* (This is an ugly solution, prone to break since it identifies blog nodes by matching a string in
* the breadcrumb. Better would be to check if node type is 'blog' But I don't know how to get that info here.
*
* Also note that it does not change the menu, so "my blog" is still present there. (I suspect that 'menu_set_location'
* (as used in blog.module blog_view) may be the function to use to change this.))
*/
function phptemplate_breadcrumb() {
   
$breadcrumb = drupal_get_breadcrumb();
    if (
$breadcrumb[1] == l('blogs',t('blog'))){         // For blog nodes...
       
unset($breadcrumb[2]);                     // ...remove "user's blog"...
       
unset($breadcrumb[1]);                  // ...and "blogs".
   
}
   
// Now call the original theme with this modified breadcrumb array, to get formatting.
  
return (theme_breadcrumb($breadcrumb));
}
?>

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.

Comments

For Drupal 6 the function could look like this:

<?php
/**
* Return a themed breadcrumb trail.
*
* @param $breadcrumb
*   An array containing the breadcrumb links.
* @return a string containing the breadcrumb output.
*/
function phptemplate_breadcrumb($breadcrumb) {
  if (!empty(
$breadcrumb)) {
    if (
$breadcrumb[1] == l('Blogs',t('blog'))){  // For blog nodes...
     
unset($breadcrumb[2]);                      // ...remove "user's blog"...
     
unset($breadcrumb[1]);                      // ...and "blogs".
   
}
   
// Now call the original theme with this modified breadcrumb array, to get formatting.
   
return '<div class="breadcrumb">'. implode(' › ', $breadcrumb) .'</div>';
  }
}
?>

--
aarakast.de

aarakast, thanks a lot. You saved my day.

I ran into the same issue with the trilingual website www.ArtAndAid.org. The above solution worked fine for English, but not for German. After I changed the 2nd if-statement to

if ($breadcrumb[1] == l(t('Blogs'), 'blog')){

it now seems to work fine for all languages. So the complete function in template.php now looks like this:

function phptemplate_breadcrumb($breadcrumb) {
  if (!empty($breadcrumb)) {
    if ($breadcrumb[1] == l(t('Blogs'), 'blog')){    // For blog nodes...
      unset($breadcrumb[2]);                      // ...remove "user's blog"...
      unset($breadcrumb[1]);                      // ...and "blogs".
    }
    // Now call the original theme with this modified breadcrumb array, to get formatting.
    return '<div class="breadcrumb">'. implode(' › ', $breadcrumb) .'</div>';
  }
}

Just use the Custom Breadcrumbs module!

http://drupal.org/project/custom_breadcrumbs

---
Like what you see? Leave a tip!
spiffy[d] | simplicity is bliss

Thanks so much for this, I've been looking for it for a long time! To me it's an outstanding tool for successful business

Scott, software developer.
Convert AVI to MP4

For Drupal 6.x you can use this module to remove breadcrumbs from public pages. You still get to keep them for administrative pages and forums.

I've been looking for this for days! This module got rid of that pesky little "create content" link, i.e., breadcrumb that was causing me such a pain. Although disabling breadcrumbs altogether actually removes the "home" breadcrumb from every page as well--which I didn't mind at all--at least now it looks cleaner and more professional. Again, thank you so much PX!