Skip to content

Instantly share code, notes, and snippets.

@ntwb
Created December 4, 2013 03:30
bbPress Custon Breadcrumbs
<?php
/*
Plugin Name: bbPress - Custom Breadcrumbs
Plugin URI: https://gist.github.com/ntwb/7781901
Description: bbPress - Custom Breadcrumbs
Version: 0.1
Author: Stephen Edgar - Netweb
Author URI: http://netweb.com.au
*/
add_filter('bbp_before_get_breadcrumb_parse_args', 'ntwb_bbpress_custom_breadcrumb' );
function ntwb_bbpress_custom_breadcrumb() {
// HTML
$args['before'] = '<div class="bbp-breadcrumb"><p>';
$args['after'] = '</p></div>';
// Separator
$args['sep'] = is_rtl() ? __( '&lsaquo;', 'bbpress' ) : __( '&rsaquo;', 'bbpress' );
$args['pad_sep'] = 1;
$args['sep_before'] = '<span class="bbp-breadcrumb-sep">' ;
$args['sep_after'] = '</span>';
// Crumbs
$args['crumb_before'] = '';
$args['crumb_after'] = '';
// Home
$args['include_home'] = $pre_include_home;
$args['home_text'] = $pre_front_text;
// Forum root
$args['include_root'] = $pre_include_root;
$args['root_text'] = $pre_root_text;
// Current
$args['include_current'] = $pre_include_current;
$args['current_text'] = $pre_current_text;
$args['current_before'] = '<span class="bbp-breadcrumb-current">';
$args['current_after'] = '</span>';
return $args;
}
@VinuRaj
Copy link

VinuRaj commented Apr 9, 2014

HI, is this plugin still working? As i can't make it work correctly.

only the Forum Name is getting displayed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment