Loading...
Hot as hell, this is the top-bar widget Link

Breadcrumb

Breadcrumb Change divider Text dividers Custom dividers Change general layout Add breadcrumb to pages, search results and archives Bootscore follows the WordPress standard and only displays breadcrumbs on single posts (where they’re most commonly needed). However, breadcrumbs can easily added to pages, archives, search results, and custom templates using the available action hooks. Hook into breadcrumb to […]

Change divider

Text dividers
// Change breadcrumb divider
add_filter('bootscore/breadcrumb/divider', function () {
  return '»';
});
Custom dividers
// Change breadcrumb divider
add_filter('bootscore/breadcrumb/divider', function () {
  return '<svg class="bs-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z"/></svg>';
});

Change general layout

/**
 * Change breadcrumb <nav> classes
 */
function change_breadcrumb_nav_class() {
  return 'overflow-x-auto text-nowrap mb-4 mt-2 py-2 px-3 border rounded';
}
add_filter('bootscore/class/breadcrumb/nav', 'change_breadcrumb_nav_class');

/**
 * Change breadcrumb <ol> classes
 */
function change_breadcrumb_ol_class() {
  return 'flex-nowrap mb-0';
}
add_filter('bootscore/class/breadcrumb/ol', 'change_breadcrumb_ol_class');

/**
 * Change breadcrumb <a> classes
 */
function change_breadcrumb_a_class() {  return 'text-decoration-none link-danger';
}
add_filter('bootscore/class/breadcrumb/item/link', 'change_breadcrumb_a_class');

Add breadcrumb to pages, search results and archives

Bootscore follows the WordPress standard and only displays breadcrumbs on single posts (where they’re most commonly needed). However, breadcrumbs can easily added to pages, archives, search results, and custom templates using the available action hooks.

/**
 * Hook breadcrumb to 'page-full-width-image.php'
 */
function hook_breadcrumb_to_page_full_width_image( $location ) {
  if ( $location === 'page-full-width-image' ) {
    the_breadcrumb();
  }
}
add_action( 'bootscore_after_featured_image', 'hook_breadcrumb_to_page_full_width_image'); 


/**
 * Hook breadcrumb to all page, archive and search templates
 */
function hook_breadcrumb_to_pages_archive_search( $location ) {
  if ( $location === 'archive' || $location == 'search' || $location == 'page' || $location == 'page-sidebar-left' || $location == 'page-sidebar-none') {
    the_breadcrumb();
  }
}
add_action( 'bootscore_after_primary_open', 'hook_breadcrumb_to_pages_archive_search'); 

Hook into breadcrumb to handle CPT’s

The breadcrumb system can be extended to support any custom post type by using the bootscore/breadcrumb/handler filter hook:

/**
 * Add CPT handler
 * Example https://github.com/bootscore/bootscore/blob/main/woocommerce/inc/wc-breadcrumb.php
 */
function my_cpt_breadcrumb_handler($handled) {
  // Only handle our custom post type
  if (is_singular('my_cpt')) {
    // Your custom breadcrumb logic
    return true; // Mark as handled
  }
  return $handled;
}
add_filter('bootscore/breadcrumb/handler', 'my_cpt_breadcrumb_handler', 15, 1);

Shortcode

For maximum flexibility, Bootscore includes a [bs-breadcrumb] shortcode that displays breadcrumb navigation anywhere in your content. This is particularly useful for widget areas, custom page templates (like Page Blank), or any location where breadcrumbs can’t be added via standard action hooks. The shortcode automatically respects all the same conditional logic and formatting as the main breadcrumb function.