Help with creating proper breadcrumbs

I really love the ease of your themes, especially since I'm an non-coder/programmer. Though unfortunately I spend hours trying to figure things out what a real coder could do in 15 minutes and now I give up. One thing this theme doesn't have, unless I missed it, is the ability to have breadcrumbs, so I added it myself and place the code in the footer:

<code><div id="bodybread"><br />
<ul id="breadcrumb"></p>
<li><a href="/" title="Home"><img src="http://www.lensdiaries.com/wp-content/themes/bp-community-child/_inc/images/home.png" alt="Home" class="home" /></a></li>
<p><?php if ( !is_home() ) { ?></p>
<li><?php the_category(', ') ?></li>
<li><?php the_title(); ?></li>
<p><?php } ?></p>
<p></div></code>

right after this code in header.php

<code><?php include (TEMPLATEPATH . '/call-signup.php'); ?><br />
<?php if($bp_existed == 'true') { //check if bp existed ?><br />
<div class="out-content" id="content"></code>

to get this http://www.lensdiaries.com/troubleshooting/header.jpg
and all works well except when in the members menu tab or activity tab and I get this:
http://www.lensdiaries.com/troubleshooting/activitymember.jpg
and when I'm in my user's profile, it pulls up the last category I built and the last post posted, instead of a proper breadcrumb, so I get this:
http://www.lensdiaries.com/troubleshooting/profile.jpg
It shouldn't say "Photography Books" etc., I want it to say either profile or something appropriate.
When I'm at a blog post, it works:
http://www.lensdiaries.com/troubleshooting/blogpost.jpg
and on a page, like the about page, it works great too, I get this:
http://www.lensdiaries.com/troubleshooting/page.jpg

(forgot how to upload images on here, swear I was able to do it before)
So any help on the proper code is greatly appreciated as this site, with your theme and support, is turning out fabulous. Thanks, rg

  • Mason

    Rolando, I like it man. You're going for it and the site is really coming along!

    Easiest way to get this done for you is to "steal" from Tammie's awesome bp-daily theme. :stuck_out_tongue:

    You're gonna want to grab lines 344-403 from custom-functions.php in bp-daily ( it's called function bpbreadcrumbs() ) and paste these lines at the bottom of your functions.php file. There's space at the bottom of this file, just be sure and do it before the closing "?>" tag.

    That being complete, go back to the exact spot in your header.php file and where you entered your breadcrumb navigation code (line 240 or so) you're going to replace what you had previously with this:

    <div id="breadcrumb">
    <?php if( $bp_existed == 'true' ) { //check if bp existed ?>
    <?php bpbreadcrumbs(); ?>
    <?php } else { // if not bp detected..let go normal ?>
    <?php wpbreadcrumbs(); ?>
    <?php } ?>
    </div>

    That was also stolen from Tammie's bp-daily theme, but she's normally pretty cool about this sorta thing. :smiley:

    This will only work because we have buddypress enabled. If you disable buddypress the breadcrumb component will not function.