Breadcrumbs Plugin is a plugin that displays a breadcrumb menu on your site.
rdfa-breadcrumbs.zip
folder.rdfa-breadcrumbs
folder to your /wp-content/plugins
directory.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:
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: ', 'rdfa_breadcrumbs' ),
'home' => __( 'Home', 'rdfa_breadcrumbs' ),
'sep' => '»',
'front_page' => false,
'bold' => true,
'show_blog' => true,
'echo' => true,
'singular_post_taxonomy' => 'category',
);
false
if no home link is needed'singular_post_taxonomy' => 'category'
How about we change the separator between each item?
<?php rdfa_breadcrumbs( array( 'sep' => '→' ) ); ?>
This time, we'll wrap the entire menu in brackets.
<?php rdfa_breadcrumbs( array( 'prefix' => '{', 'suffix' => '}' ) ); ?>
Now, let's add categories for singular posts.
<?php rdfa_breadcrumbs( array( 'singular_post_taxonomy' => 'category' ) ); ?>
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 RDFa breadcrumbs like this:
Basically, this just checks to see if the plugin is activated and has loaded the appropriate function.
RDFa Breadcrumbs 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 {
}
.rdfa-breadcrumbs {
}
.breadcrumbs-separator {
}
RDFa Breadcrumbs is licensed under the GNU General Public License, version 2 (GPL).
2011 – 2012 © Digital Fair. All rights reserved.