Skip to content

Instantly share code, notes, and snippets.

@ntwb
Last active August 29, 2015 14:03
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
<?php
/*
Plugin Name: bbPress - Breadcrumbs #2635
Plugin URI: https://bbpress.trac.wordpress.org/ticket/2635
Description: bbPress - Breadcrumbs #2635
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"><ul>';
$args['after'] = '</ul></div>';
// Separator
// $args['sep'] = is_rtl() ? __( '&lsaquo;', 'bbpress' ) : __( '&rsaquo;', 'bbpress' );
$args['sep'] = '';
$args['pad_sep'] = 1;
$args['sep_before'] = '';
$args['sep_after'] = '';
// Crumbs
$args['crumb_before'] = '<li>';
$args['crumb_after'] = '</li>';
// Current
$args['current_before'] = '<span class="bbp-breadcrumb-current">';
$args['current_after'] = '</span>';
return $args;
}
Index: src/templates/default/css/bbpress.css
===================================================================
--- src/templates/default/css/bbpress.css (revision 5415)
+++ src/templates/default/css/bbpress.css (working copy)
@@ -401,7 +401,10 @@
/* =Breadcrumb and Tags
-------------------------------------------------------------- */
-div.bbp-breadcrumb {
+div.bbp-breadcrumb,
+div.bbp-breadcrumb ul,
+div.bbp-breadcrumb li,
+div.bbp-breadcrumb a {
float: left;
}
@@ -423,6 +426,8 @@
clear: both;
}
+div.bbp-breadcrumb ul li a::after{ content: ' › '; }
+
/* =Search
-------------------------------------------------------------- */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment