-
Notifications
You must be signed in to change notification settings - Fork 11
Breadcrumbs
Ben Gillbanks edited this page Aug 30, 2019
·
7 revisions
Display breadcrumbs on your posts, and categories.
This module needs two things to work:
- It needs to be enabled in the Toolbelt Settings
- It needs to be implemented in the theme.
To keep speed high, Toolbelt only includes code for enabled modules. The breadcrumbs only work when the tb_breadcrumbs function is called, but the function will not exist without the module being enabled.
In addition, by having a setting; themes that add support for breadcrumbs can still disable them whilst using other Toolbelt features.
To add to a theme I would suggest creating a new template function that looks something like:
function my_theme_breadcrumbs() {
if ( function_exists( 'tb_breadcrumbs' ) ) {
tb_breadcrumbs();
}
}
This reduces the likelihood of things breaking. If Toolbelt gets deleted, or the module disabled, then no errors will appear and the site will continue to work.
Toolbelt is built by Ben from Pro Theme Design.