Jump to Sidebar Content | Jump to Main Page Content

Begin site navigation:
End site navigation.
Begin left menu:
Topics

Pages

 
Search
 
Links
 
Subscribe
 
End of left menu.
Begin main content:
Blog
Archive for February 2012
« Previous Entries | Next Entries »

Bread Your BuddyPress With Breadcrumbs Everywhere

Saturday, February 25, 2012 10:48 pm

A couple of weeks ago, I was trying to customize some BuddyPress navigation and thought it would be pretty easy, maybe an hour or two. As I dug into it further, a few hours turned into a few days and I started writing a fairly detailed function. With so much time invested, I figured I’d share the code here when I was done. But midway through I realized it would work as a plugin as well.

So I wrote my first WordPress plugin, Breadcrumbs Everywhere.


Photo by Boegh

Description

Missing crumbs? Find them with Breadcrumbs Everywhere! This plugin adds breadcrumb trail navigation to BuddyPress. Simple, just add one line of code to your template. You don’t need to use it, but there is an admin feature, too. Requires BuddyPress 1.5 or higher.

Download the Plugin

** Download the stable release from WordPress.org **

Current Version

1.6 release 2013-12-19
breadcrumbs-everywhere.1.6.zip

Current Beta

None

Previous Releases

1.5 release 2013-12-18
breadcrumbs-everywhere.1.5.zip

1.4 release 2013-02-21
breadcrumbs-everywhere.1.4.zip

1.3 release 2012-08-07
breadcrumbs-everywhere.1.3.zip

1.2 release 2012-05-04
breadcrumbs-everywhere.1.2.zip

1.1 release 2012-04-17
breadcrumbs-everywhere.1.1.zip

1.0 initial release 2012-02-25
breadcrumbs-everywhere.1.0.zip

Demo

You can see a customized version of the plugin in use on the Art Directors Club of Denver website. Check out a member profile.

Installation

• Upload the breadcrumbs-everywhere folder to the /wp-content/plugins/ directory
• Activate the plugin through the ‘Plugins’ menu in WordPress
• Add this function anywhere in your BuddyPress template, typically in header.php:

<?php if (function_exists('breadcrumbs_everywhere')) breadcrumbs_everywhere(); ?>

• That’s it!

Screenshots


Breadcrumbs on Member pages

Breadcrumbs on Group pages

Admin page

How to change the default settings

Breadcrumbs Everywhere works as a one step template tag using the BuddyPress default page names: Members, Groups, Activity, and Forums. If you have renamed these pages the plugin will use your custom names instead. Additionally, an admin feature is available to change these default settings (possibly with more options in the future):

• Text for the Home link
• Text for the Blog link
• Text for the breadcrumb divider

From the WordPress admin menu, go `BuddyPress > Breadcrumbs Everywhere`.

How to display breadcrumbs for BuddyPress Actions

Trails to Level 5 Actions (i.e. Home > Members > Admin > Messages > Sent) are possible, but they are not activated by default. See /includes/crumbs-core.php for customization instructions.

How to display breadcrumbs on my primary Home or Blog pages

Including a Home link on your Home page (or a Blog link on your main Blog page) is possible, but this is not activated by default. See /includes/crumbs-core.php for customization instructions.

Changelog

= 1.6 =
* Maintenance release, improved performance
* Fixed “Trying to get property of non-object” notice on line 39 in Debug Mode
* Fixed “Undefined variable: id” notice on lines 119, 286, 288, 292, 322 in Debug Mode
* Fixed “Undefined variable: groupactions” notice on line 194 in Debug Mode
* Fixed “Undefined property: WP_Error::$term_id” notice on line 323 in Debug Mode
* Fixed “Undefined property: WP_Error::$parent” notice on line 324 in Debug Mode
* Fixed “Undefined variable: prefix” notice on line 326 in Debug Mode
* Fixed “Undefined variable: display” notice on line 326 in Debug Mode
* Added title attribute to links
* Added Italian PO file in `/languages`

= 1.5 =
* Prep work for localization (suggested by angslycke – thanks!)
* Added German, French and Spanish PO files in /languages
* Added schema.org microdata (suggested by miguelcortereal – thanks!)
* Current items on pages are now linked by default (for microdata structure)
* Changed relative links to absolute URLs in Groups chain (for microdata structure)
* Improved formatting for Groups default tab (i.e. Child Group > home = Child Group > Home)
* Improved compliance with WordPress PHP doc/code standards
* Moderate code rewrite
* Tested for BP 1.9

= 1.4 =
* Crumbs now display in title case on Member pages
* Tested for BP 1.7-beta1

= 1.3 =
* Changed bp_has_profile() to bp_is_user() in crumbs-core.php
* Minor HTML formatting in crumbs-admin.php

= 1.2 =
* Crumbs now detect posts on home vs. static home page
* Removed Blog link if posts are on front
* Removed Members link from registration pages
* Added top-level crumbs on plugin pages
* Minor code cleanup

= 1.1 =
* Changed bp_init to bp_include in loader.php
* Updated plugin homepage URL in loader.php
* Improved formatting for paginated pages
* Crumbs now display on attachment posts and pages
* Level 5 actions on Groups now show by default
* Improved formatting for slug-based crumbs (i.e. Group > Send-invites = Group > Send Invites)
* Added compatibility for BP Group Hierarchy
* Added compatibility for Achievements for BuddyPress
* Added compatibility for multisite installations

= 1.0 =
* Initial release

Reviews

Daily Tip: Add Breadcrumbs Everywhere within BuddyPress – Sarah Gooding | wpmu.org

More Info

Huge thanks to the BuddyPress development team for the BuddyPress Skeleton Component plugin which served as a template for structuring the core files and writing my admin component.

I hope the plugin is useful to you — enjoy!

End of main content.