Breadcrumbs Plus


Breadcrumbs Plus provide links back to each previous page the user navigated through to get to the current page or – in hierarchical site structures – the parent pages of the current one.

It gives you a new template tag called breadcrumbs_plus() that you can place anywhere in your template files.

Installation

  1. Upload `breadcrumb-plus` to the `/wp-content/plugins/` directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. Add the appropriate code to your template files.

Usage

<?php breadcrumbs_plus( $args ); ?>

Default Usage

$defaults = array(
	'prefix' => '<p>',
	'suffix' => '</p>',
	'title' => __( 'You are here: ', 'breadcrumbs-plus' ),
	'home' => __( 'Home', 'breadcrumbs-plus' ),
	'sep' => '»',
	'front_page' => false,
	'bold' => true,
	'show_blog' => true,
	'echo' => true,
	'singular_post_taxonomy' => 'category',
);

Examples

<?php breadcrumbs_plus( 'home=Principal' ); ?>
You are here: Principal » Uncategorized » Hello world!
<?php breadcrumbs_plus( array( 'home' => 'Main', 'sep' => '-' ) ); ?>
You are here: Main - Uncategorized - Hello world!

Localization

  • English – (en_EN)
  • French – (fr_FR)
  • Italian – (it_IT)
  • Spanish – (es_ES)

Posted in

38 responses to “Breadcrumbs Plus”

  1. Posted October 11, 2010 at 8:15 pm | Permalink

    Thanks very much

    Didnt understand it all ; early days for me; but I appreciate your style and will likely return

    cheers

    Iain

    1. Posted December 5, 2011 at 8:00 am | Permalink

      You had some nice points here. I done a research on the topic and got most peoples will agree with you

  2. Posted October 13, 2010 at 9:08 am | Permalink

    Hi, Julio,
    I’m testing your plugin and it’s running ok, just pasted the code before into the page.php, it appair in the bottom of every page; it’s very useful. But I don’t know to change the size of font.Could you indicates how to fix the size, font type, colour, etc?

    Thank you in advance,
    Regards,
    Albert,

    1. Posted October 13, 2010 at 10:28 pm | Permalink

      Breadcrumbs Plus comes with some extra classes to work with, so you can have a bit of freedom when styling your menu. Here are the CSS classe for your use:

      #breadcrumbs {
          font-size: 30px;
      }
  3. Posted October 25, 2010 at 8:42 pm | Permalink

    Hi!

    Is there a way to NOT have the ‘blog’ part of the breadcrumb trail show up?

    1. Posted October 26, 2010 at 6:04 am | Permalink

      Hi Dan!

      No way in this version. May be in the next version.

      1. Alex
        Posted November 16, 2010 at 10:29 am | Permalink

        I have a first page as a post and the rest of my site as pages. This seems to remove the blog bredcrumb part.

        Regards, Alex

    2. Posted November 9, 2010 at 9:14 am | Permalink

      Hey Dan, I know Luis just said no… And I hope Luis doesn’t mind if I quickly interject… But if you jump onto line 58 of breadcrumbs-plus.php… Make it:

      $bloglink = $homelink;

      That’s it… It’ll get rid of “Blog” :-)

      1. Jürgen
        Posted June 28, 2011 at 6:30 am | Permalink

        Could you be more specific – what is line 58 in the original code. It looks to me that my line 58 is not same as yours, and your fix placed in my line 58 doesn’t work. Thanks in advance!

  4. Posted November 7, 2010 at 11:44 am | Permalink

    In Thesis, the breadcrumb is automatically placed after header, though I want it before header. Can I disable the default placement? Thanks!

  5. Posted November 7, 2010 at 11:50 am | Permalink

    I see! In the plugin php file I changed the Thesis hook to:

    thesis_hook_before_header

    Thanks

    1. Posted November 10, 2010 at 12:09 am | Permalink

      Hi David!

      I suggest you make the changes as follows:

      add_action( 'init', 'thesis_breadcrumbs_plus' );
      
      function thesis_breadcrumbs_plus() {
      	remove_action( 'thesis_hook_before_content','breadcrumbs_plus' );
      	add_action( 'thesis_hook_before_header','breadcrumbs_plus' );
      }
  6. Posted November 9, 2010 at 1:11 pm | Permalink

    Luis – love the breadcrumb plus plugin, very pleased with it from all the options.

    I’m trying to limit the amount of characters/string of the plugin so that it leaves [...] at the end and no idea how to insert it… php not up to scratch!!

    Any suggestions of how I can use the following code to apply it to the breadcrumb (maybe you have a better solution!)?

    Any help ASAP massively appreciated!!!!

  7. Posted November 9, 2010 at 1:12 pm | Permalink

    Code…

    $length =10; // how many character you want to display.

    $text = “Here is some text” ; // The Text.

    $check = substr($text,$length,1); // To find what is the character after the last shown character

    if($check != ” “){ // if the character is not a space ( it is be a letter ) we have to show it !

    while ( $check != ” “){ // we will do that while the character is a letter

    $length = $length + 1 ; //

    $check = substr($text,$length,1); // To find what is the character again

    }

    }

    $display = substr($text, 0, $length);

    echo $display;

    echo “…”;

  8. Marcos
    Posted November 18, 2010 at 9:33 pm | Permalink

    About the trail’s bug showing the nonsense “Blog”, please do post these sort of limitations clearly on the explanation of your plugin, so we do not have to waste our time installing it and then discovering the surprise by ourselves.

  9. Kiva
    Posted November 26, 2010 at 7:13 pm | Permalink

    I’m new to WordPress… what theme file do I insert that code in to make this plugin work? Does it matter where in the file? thanks!

  10. George Inggs
    Posted December 8, 2010 at 2:09 am | Permalink

    We’re using the PaperMade Theme and found that in single.php, our categories and post titles weren’t working – here’s what I changed to get it working (from line 69ish):


    /* If viewing post. */
    if ( is_single() ) {

    global $wp_query;
    $thePostID = $wp_query->post->ID;
    $cats = get_the_category($thePostID);
    $cat = $cats[0];

    if ( is_object( $cat ) ) {
    if ( $cat->parent != 0 )
    $output .= get_category_parents( $cat->term_id, true, " " . $separator . " " );

    else
    $output .= 'term_id ) . '">' . $cat->name . ' ' . $separator . ' ';

    }

    $output .= bold( get_the_title($thePostID), $r['bold'] );
    }

    1. George Inggs
      Posted January 25, 2011 at 3:58 am | Permalink

      Never mind – this broke hard on the latest update.


      /* If viewing post. */
      if ( is_single() ) {
      global $wp_query;
      $thePostID = $wp_query->post->ID;
      $cats = get_the_category($thePostID);
      $cat = $cats[0];
      if (is_object($cat)) {
      if ($cat->parent != 0) {
      $html .= $home . " " . $separator . " " .get_category_parents( $cat->term_id, true, " " . $separator . " " );
      }
      $html .= _bold_( get_the_title($thePostID), $r['bold'] );
      }
      }

      Is what we have now.

  11. Posted December 16, 2010 at 12:44 am | Permalink

    Muito bom o plugin, obrigada!

    1. Posted December 16, 2010 at 8:34 pm | Permalink

      Graças Gabriela

  12. Posted December 16, 2010 at 12:54 am | Permalink

    como eu edito o CSS? queria modificar a cor dos links.. usei neste site: http://www.bambuassessoria.com.br/novos-horizontes/

    1. Posted December 16, 2010 at 8:40 pm | Permalink

      Você precisa editar o arquivo style.css

      #breadcrumbs a {
          color: blue;
      }
  13. Mak
    Posted December 16, 2010 at 2:40 am | Permalink

    Is there a way to just make it link that says ‘back’ ? And it will go back to the previous page? For some reason I thought this plugin was capable of just doing that as well. Thanks!!

  14. Posted January 6, 2011 at 6:52 pm | Permalink

    Just wanna say great plugin, it was love at first site :)

  15. Daitya
    Posted January 18, 2011 at 10:43 am | Permalink

    Thanks for the breadcrumbs widget – works great. However, please I want to change the text (get rid of) “You are here”. Where can I do this? Where is the widget code actually – in which file(s)? Couldn’t find it in the loop, nor in widget.php. BTW, I’m using the theme twentyten.

    1. Posted January 18, 2011 at 6:35 pm | Permalink

      Hi Daitya!

      Thank’s for you comments.

      Well, to change “You are here: ” write:

      <?php breadcrumbs_plus( array( 'title' => 'Your text: ' ) ); ?>
      
  16. Daitya
    Posted February 7, 2011 at 3:32 am | Permalink

    Hi Luis, I’m running WP 3.0.4 with multisite network. The idea is to use WP as CMS, with my website organized into a main site and 4 sub or child sites.

    Is there a way to incorporate your plugin so that the breadcrumbs reflect sitewide navigation, rather than individual site navigation?

    For example, when reader views post in child site, would like breadcrumb to show:

    mainsite home > childsite home > category > post title

    Many thanks!

    1. Posted February 7, 2011 at 8:10 pm | Permalink

      Hi Daitya!

      It is not possible to do this at the moment, but thanks for the idea, I will implement soon.

      Thanks

  17. Posted February 24, 2011 at 11:46 am | Permalink

    how change the the font that looks similar to a template that I use?

    1. Posted February 24, 2011 at 8:11 pm | Permalink

      You can change the font style:

      .breadcrumbs-plus {
      font: <your-style>;
      }

      1. Posted April 17, 2011 at 5:28 pm | Permalink

        Thanks for a very useful plugin – I must have tried them all but yours works just perfectly and is very simple to customise. A*****

        Charles

  18. Max
    Posted April 17, 2011 at 12:49 pm | Permalink

    Hello, Luis!
    For example I have this breadcrumbs:

    Home » Portfolio » Job » Logos » Current_page

    …and when I press any links (for example “Logos”) – I come to page mydomain.com/category/portfolio/job/logos

    Is any way to remove “category” from this path to make it like this:
    mydomain.com/portfolio/job/logos
    ???
    Thanks!

  19. Posted July 16, 2011 at 1:04 am | Permalink

    Plugin works great on pages, but when showing a single post using the custom permalink postid#/category/postname (which has performance benefits over just using category/postname), the breadcrumb trail lists “home>postname>category>postname. Is there any way to correct this???

  20. Posted August 9, 2011 at 2:12 am | Permalink

    Hi,

    Do you know if there is a way to have the breadcrumb display the Page Label instead of the Page Title?

    For SEO purposes it is good to have the Page Title longer with more keywords. But for navigation (side navbar or breadcrumb) it is better to have it shorter. I have been using a WP plugin to create Page Labels (not sure if there is a way to do this without a plugin) and I would like the breadcrumb to pick those short-and-sweet labels.

    I would appreciate it if you can point me in the right direction.

    Thanks!

  21. Felix
    Posted September 27, 2011 at 11:22 am | Permalink

    hi there!

    i can`t get your plug installed in my wp-template. where exactly do i have to place which code? do i have to place it once or in every site i want the breadcrumbs to be shown?

    kr,

    felix

  22. Posted November 16, 2011 at 8:10 pm | Permalink

    Saludos,

    I have this problem how would I fix it?
    This is the call in the theme:

    -Category pages display like this:
    Home » The “Undocumented Christ” » Missions News » Mission Stories
    -It should be like this:
    Home » Missions News » Mission Stories

    -Single Post displays like this:
    Home » The “Undocumented Christ” » Missions News » Mission Stories » The “Undocumented Christ”
    -It should be like this:
    Home » Missions News » Mission Stories » The “Undocumented Christ”

    How would I fix this?

  23. dpo
    Posted December 12, 2011 at 5:37 pm | Permalink

    I just don’t get it I have put lots of these plugins on my WPress site and had to take them all off again because I don’t know how to work them ,.. Yours, It’s pluged in on my site now http://www.1stpro.com but it’s not working ,.

    Can you help ??/ how do you work your bread crumb map ?

  24. Pat
    Posted December 28, 2011 at 5:48 pm | Permalink

    Agradeceria ayuda por favor. Just updated to latest version and it is displaying like this? With the >> arrows under ?? Why?

    You are here: Home Missions News Renewal & Perpetual Vows celebration

    »
    »

    see it here: http://www.oblatemissions.org/2011/09/renewal-perpetual-vows-celebration/

Leave a Reply