/<?php echo BP_ACTIVITY_SLUG; ?> /" title="<?php _e('Activity', 'product'); ?> "><?php _e('Activity', 'product'); ?> </a> </li> <?php } ?> <li<?php if (bp_is_page(BP_MEMBERS_SLUG) || BP_IS_USER()) { ?> class="selected"<?php } ?> > <a href="<?php echo site_url(); ?> /<?php echo BP_MEMBERS_SLUG; ?> /" title="<?php _e('Members', 'product'); ?> "><?php
function bpbreadcrumbs() { if (is_page() && !is_front_page() || is_single() || is_category()) { echo '<ul class="breadcrumbs">'; echo '<li class="front_page"><a href="' . get_bloginfo('url') . '">' . get_bloginfo('name') . '</a></li>'; if (is_page()) { $ancestors = get_post_ancestors($post); if ($ancestors) { $ancestors = array_reverse($ancestors); foreach ($ancestors as $crumb) { echo '<li><a href="' . get_permalink($crumb) . '">' . get_the_title($crumb) . '</a></li>'; } } } if (is_single()) { $category = get_the_category(); echo '<li><a href="' . get_category_link($category[0]->cat_ID) . '">' . $category[0]->cat_name . '</a></li>'; } if (is_category()) { $category = get_the_category(); echo '<li>' . $category[0]->cat_name . '</li>'; } // Current page if (is_page() || is_single()) { $title = get_the_title(); if ($title != "") { echo '<li class="current">' . get_the_title() . '</li>'; } } } if (bp_is_page(BP_ACTIVITY_SLUG)) { echo '<li>' . __('Activity', 'product') . '</li>'; } if (bp_is_page(BP_MEMBERS_SLUG) || BP_IS_USER()) { echo '<li class="current">' . __('Members', 'product') . '</li>'; } if (bp_is_page(BP_GROUPS_SLUG) || bp_is_group()) { echo '<li class="current">' . __('Groups', 'product') . '</li>'; } if (bp_is_page(BP_FORUMS_SLUG)) { echo '<li class="current">' . __('Forums', 'product') . '</li>'; } if (bp_is_page(BP_BLOGS_SLUG)) { echo '<li class="current">' . __('Blogs', 'product') . '</li>'; } echo '</ul>'; if (is_front_page()) { // Front page echo '<ul class="breadcrumbs">'; echo '<li class="front_page"><a href="' . get_bloginfo('url') . '">' . get_bloginfo('name') . '</a></li>'; echo '<li class="current">' . __('Home', 'product') . '</li>'; echo '</ul>'; } }