A guide to the Breadcrumbs Plus plugin

# A guide to Breadcrumbs Plugin

Breadcrumbs Plugin is a plugin that displays a breadcrumb menu on your site.

## How to install the plugin

1. Uzip the `breadcrumbs-plus.zip` folder.
2. Upload the `breadcrumbs-plus` folder to your `/wp-content/plugins` directory.
3. In your WordPress dashboard, head over to the Plugins section.
4. Activate Breadcrumbs Plus.

## How to use the plugin

This plugin work automatically with Genesis, Hybrid, Nifty, Thematic and Thesis. In other theme won't work automatically. So, you'll have to add it manually in your template files. Where? Well, that's really up to you. You can add it anywhere you want.

This is the basic code:

    <?php breadcrumbs_plus(); ?>

## The default parameters

By default, this plugin is designed to show things a certain way. Here are the defaults:

    $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',
    );

prefix
  What should be shown before the breadcrumb
suffix
  What should be shown after the breadcrumb
title
  What should be shown before home link.
sep
  The element that separates each item in the breadcrumb menu
home
  The text for the home link. Set to `false` if no home link is needed
echo
  Whether to print on the screen or return for use in a function
singular_{$post_type}_taxonomy
  A taxonomy to use on singular views of specific post types
  E.g. `'singular_post_taxonomy' => 'category'`

## Custom examples

How about we change the separator between each item?

    <?php breadcrumbs_plus( array( 'sep' => '&rarr;' ) ); ?>

This time, we'll wrap the entire menu in brackets.

    <?php breadcrumbs_plus( array( 'prefix' => '{', 'suffix' => '}' ) ); ?>

Now, let's add categories for singular posts.

    <?php breadcrumbs_plus( array( 'singular_post_taxonomy' => 'category' ) ); ?>

## Protect yourself from errors in the future

Sometimes, we stop using plugins, but we forget to remove the function calls to the plugins in our theme files. When deactivated, this causes errors. To protect yourself from these errors, you can call the breadcrumbs plus like this:

    <?php if ( function_exists( 'breadcrumbs_plus' ) ) { breadcrumbs_plus(); } ?>

Basically, this just checks to see if the plugin is activated and has loaded the appropriate function.

## Styling your breadcrumbs plus

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 classes for your use:

    .breadcrumb {
    }

    .breadcrumbs-plus {
    }

    .breadcrumbs-separator {
    }

## Copyright & license

Breadcrumbs Plus is licensed under the GNU General Public License, version 2 (GPL).

2010 – 2011 © Luis Alberto Ochoa Esparza. All rights reserved.