PHPackages                             tyxla/carbon-breadcrumbs - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. tyxla/carbon-breadcrumbs

ActiveLibrary[Admin Panels](/categories/admin)

tyxla/carbon-breadcrumbs
========================

A basic WordPress plugin for breadcrumbs with advanced capabilities for extending.

v1.0.2(10y ago)195.2k5[2 issues](https://github.com/tyxla/carbon-breadcrumbs/issues)GPL-2.0+PHP

Since Jan 5Pushed 7y ago4 watchersCompare

[ Source](https://github.com/tyxla/carbon-breadcrumbs)[ Packagist](https://packagist.org/packages/tyxla/carbon-breadcrumbs)[ Docs](https://github.com/tyxla/carbon-breadcrumbs)[ RSS](/packages/tyxla-carbon-breadcrumbs/feed)WikiDiscussions master Synced today

READMEChangelog (3)DependenciesVersions (4)Used By (0)

Carbon Breadcrumbs [![Build Status](https://camo.githubusercontent.com/e2c69d118b4d854e499fd555392dac21b8bde6564be802b65d1b7600a4971a58/68747470733a2f2f7472617669732d63692e6f72672f7479786c612f636172626f6e2d62726561646372756d62732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/tyxla/carbon-breadcrumbs) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/91a9f3d7f0d184fbb15d9b68be16cfbcf1e1df47c42b622087f4fb635a2312df/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7479786c612f636172626f6e2d62726561646372756d62732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/tyxla/carbon-breadcrumbs/?branch=master) [![Code Coverage](https://camo.githubusercontent.com/50d515544afa06ebef2641e8a8f698f7e6df58577faf452d386d42f6a6d76850/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7479786c612f636172626f6e2d62726561646372756d62732f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/tyxla/carbon-breadcrumbs/?branch=master)
=====================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#carbon-breadcrumbs---)

A basic WordPress plugin for breadcrumbs with advanced capabilities for extending. Provides the theme and plugin developers an easy way to build and implement highly customizable breadcrumb functionality, specifically tailored to their needs.

---

Administration &amp; Settings
-----------------------------

[](#administration--settings)

Although this plugin provides various ways to be extended, it can be used by people with no programming skills.

If Carbon Breadcrumbs is installed and activated as a WordPress plugin, a `Carbon Breadcrumbs` page will appear in `Settings` in the WordPress administration. This page allows the default rendering settings to be modified to the preferred ones. The following settings are available:

- **Glue** - Displayed between the breadcrumb items.
- **Link Before** - Displayed before the breadcrumb item link.
- **Link After** - Displayed after the breadcrumb item link.
- **Wrapper Before** - Displayed before displaying the breadcrumb items.
- **Wrapper After** - Displayed after displaying the breadcrumb items.
- **Title Before** - Displayed before the breadcrumb item title.
- **Title After** - Displayed after the breadcrumb item title.
- **Min Items** - Determines the minimum number of items, required to display the breadcrumb trail.
- **Last Item Link** - Whether the last breadcrumb item should be a link.
- **Display Home Item?** - Whether the home breadcrumb item should be displayed.
- **Home Item Title** - Determines the title of the home item.
- **Renderer** - Determines the class name of the renderer object.

If this plugin is manually included in a theme, the administration settings page will not be shown by default. This allows theme developers to disable control over the breadcrumb trail settings, if necessary. In this case, the administration settings can still be enabled by defining the `CARBON_BREADCRUMB_ENABLE_ADMIN` constant and setting it to true. To do that, add the following line to your theme `functions.php` file:

```
define('CARBON_BREADCRUMB_ENABLE_ADMIN', true);

```

**Note:** The administration settings override the default breadcrumb settings, by using the `carbon_breadcrumbs_renderer_default_options` filter. This means that developers can still override these settings by using the `carbon_breadcrumbs_before_render` action. Both `carbon_breadcrumbs_renderer_default_options` and `carbon_breadcrumbs_before_render` are documented below in this readme.

---

Usage &amp; Examples
--------------------

[](#usage--examples)

#### Basic

[](#basic)

The following example is the most basic way to display a breadcrumb trail, using the default options.

```

```

#### Simple with configuration options

[](#simple-with-configuration-options)

The following example will display a breadcrumb trail with the specified settings.

```

```

#### Intermediate

[](#intermediate)

The following example will create and render an breadcrumb trail, providing you the option to set it up yourself with your preferred configuration. You can further manipulate the trail object by using its built-in methods.

```

```

#### Advanced

[](#advanced)

The following example will create, setup and render a breadcrumb trail with a custom breadcrumb items and will use a custom renderer. It also takes advantage of some of the available filters and actions. Each portion of the code can be used separately in case you need to perform advanced manipulation on the trail. The following can be seen in the example: custom renderer setup, prepending text to specific items, appending something to the URLs of some items, adding a custom item, adding a page item along with its ancenstry, removing a certain item by name and link, removing all items by priority, initialization with setup and rendering. Each portion of the code is commented accordingly so you can understand what it does.

```

```

**Note:** The Carbon\_Breadcrumb\_Trail items are preserved in a multidimensional array, where the array keys contain the priority, and the value is an array with all items of that priority, ordered by the date of their addition (oldest to newest).

---

Configuration Options
---------------------

[](#configuration-options)

The following options can be passed to `Carbon_Breadcrumb_Trail()`, `Carbon_Breadcrumb_Trail::output()` or `Carbon_Breadcrumb_Trail_Renderer()` - whichever you are using.

#### glue

[](#glue)

*(string). Default: **' &gt; '***.

The HTML, displayed between the breadcrumb items.

#### link\_before

[](#link_before)

*(string). Default: **''** (none)*.

The HTML before the `` link of each of the breadcrumb items.

#### link\_after

[](#link_after)

*(string). Default: **''** (none)*.

The HTML after the `` link of each of the breadcrumb items.

#### wrapper\_before

[](#wrapper_before)

*(string). Default: **''** (none)*.

The HTML before all breadcrumb items.

#### wrapper\_after

[](#wrapper_after)

*(string). Default: **''** (none)*.

The HTML after all breadcrumb items.

#### title\_before

[](#title_before)

*(string). Default: **''** (none)*.

The HTML displayed before the breadcrumb item title.

#### title\_after

[](#title_after)

*(string). Default: **''** (none)*.

The HTML displayed after the breadcrumb item title.

#### min\_items

[](#min_items)

*(int). Default: **2***.

The minimum number of breadcrumb items, required to display the trail.

#### last\_item\_link

[](#last_item_link)

*(bool). Default: **true***.

Whether the last item will be a link or not.

#### display\_home\_item

[](#display_home_item)

*(bool). Default: **true***.

Whether the **Home** breadcrumb item should be displayed or not.

#### home\_item\_title

[](#home_item_title)

*(string). Default: **Home***.

The title of the home item.

#### renderer

[](#renderer)

*(string). Default: **Carbon\_Breadcrumb\_Trail\_Renderer***.

The class name that will be used for the breadcrumb trail renderer object. Should correspond to a declared PHP class. This setting is used in the `Carbon_Breadcrumb_Trail` instance instead of being passed to the `Carbon_Breadcrumb_Trail_Renderer` instance.

---

Actions &amp; Filters
---------------------

[](#actions--filters)

The following actions and filters can allow developers to modify the default behavior and hook to add custom functionality in various situations.

---

### Filters

[](#filters)

#### the\_title

[](#the_title)

**$title** *(string)*. The unfiltered title of the item.

This filter is default for WordPress and is applied on the titles of all Post, Term and User breadcrumb items.

#### carbon\_breadcrumbs\_renderer\_class

[](#carbon_breadcrumbs_renderer_class)

**$class\_name** *(string)*. The name of the renderer class.

This filter can allow you to modify the default renderer class, which is used for rendering the breadcrumb trail.

#### carbon\_breadcrumbs\_renderer\_default\_options

[](#carbon_breadcrumbs_renderer_default_options)

**$options** *(array)*. A list of all default options.

This filter allows you to modify the default options of the breadcrumb renderer. They are used if no other settings are specified. Here is a list of all default options and their default values:

```
$default_options = array(
	'glue' => ' &gt; ',
	'link_before' => '',
	'link_after' => '',
	'wrapper_before' => '',
	'wrapper_after' => '',
	'title_before' => '',
	'title_after' => '',
	'min_items' => 2,
	'last_item_link' => true,
	'display_home_item' => true,
	'home_item_title' => __('Home', 'carbon_breadcrumbs'),
	'renderer' => 'Carbon_Breadcrumb_Trail_Renderer',
);

```

#### carbon\_breadcrumbs\_auto\_sort\_items

[](#carbon_breadcrumbs_auto_sort_items)

**$autosort** *(bool)*. Whether to autosort the items before rendering or not.

This filter allows you to specify whether to automatically sort the items by their priority right before they are rendered.

#### carbon\_breadcrumbs\_item

[](#carbon_breadcrumbs_item)

**$item** *(Carbon\_Breadcrumb\_Item)*. The breadcrumb item object.

This filter allows you to modify a breadcrumb item right before its rendering.

#### carbon\_breadcrumbs\_item\_link

[](#carbon_breadcrumbs_item_link)

**$link** *(string)*. The link of the breadcrumb item.

**$item** *(Carbon\_Breadcrumb\_Item)*. The breadcrumb item object.

This filter allows you to modify the link URL of a breadcrumb item right before its rendering.

#### carbon\_breadcrumbs\_item\_title

[](#carbon_breadcrumbs_item_title)

**$title** *(string)*. The title of the breadcrumb item.

**$item** *(Carbon\_Breadcrumb\_Item)*. The breadcrumb item object.

This filter allows you to modify the title of a breadcrumb item right before its rendering.

#### carbon\_breadcrumbs\_item\_attributes

[](#carbon_breadcrumbs_item_attributes)

**$attributes** *(array)*. The custom attributes of the breadcrumb item.

**$item** *(Carbon\_Breadcrumb\_Item)*. The breadcrumb item object.

**$trail** *(Carbon\_Breadcrumb\_Trail)*. The breadcrumb trail object.

**$trail\_renderer** *(Carbon\_Breadcrumb\_Trail\_Renderer)*. The breadcrumb trail renderer object.

**$counter** *(int)*. The index of this breadcrumb item.

This filter allows you to modify the link attributes of a breadcrumb item right before its rendering. By default, the `target="_self"` attribute is added. This array expects the attribute name as the array element key, and the attribute value as the array element value. Example: `'target' => '_blank'`.

#### carbon\_breadcrumbs\_item\_output

[](#carbon_breadcrumbs_item_output)

**$output** *(string)*. The HTML output of the breadcrumb item.

**$item** *(Carbon\_Breadcrumb\_Item)*. The breadcrumb item object.

**$trail** *(Carbon\_Breadcrumb\_Trail)*. The breadcrumb trail object.

**$trail\_renderer** *(Carbon\_Breadcrumb\_Trail\_Renderer)*. The breadcrumb trail renderer object.

**$index** *(int)*. The index of this breadcrumb item.

This filter allows you to modify the HTML output of a breadcrumb item right after its rendering.

#### carbon\_breadcrumb\_enable\_admin

[](#carbon_breadcrumb_enable_admin)

**$enabled** *(bool)*. Whether to enable the administration interface.

This filter allows you to enable/disable manually the administration interface. When you enable/disable the administration interface, you also enable/disable the admin settings when displaying the breadcrumb trail.

---

### Actions

[](#actions)

#### carbon\_breadcrumbs\_before\_setup\_trail

[](#carbon_breadcrumbs_before_setup_trail)

**$trail** *(Carbon\_Breadcrumb\_Trail)*. The breadcrumb trail object.

This action allows you to modify the breadcrumb trail object before the setup (which adds breadcrumb items) has started.

#### carbon\_breadcrumbs\_after\_setup\_trail

[](#carbon_breadcrumbs_after_setup_trail)

**$trail** *(Carbon\_Breadcrumb\_Trail)*. The breadcrumb trail object.

This action allows you to modify the breadcrumb trail object after the setup (which adds breadcrumb items) has been completed.

#### carbon\_breadcrumbs\_before\_render

[](#carbon_breadcrumbs_before_render)

**$trail** *(Carbon\_Breadcrumb\_Trail)*. The breadcrumb trail object.

This action allows you to modify the breadcrumb trail object right before the breadcrumb trail rendering.

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 99.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~48 days

Total

3

Last Release

3735d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/774c1731d3e408331d6254fe7c5add84e6172385909ed73bd6a6922dc7b81d76?d=identicon)[tyxla](/maintainers/tyxla)

---

Top Contributors

[![tyxla](https://avatars.githubusercontent.com/u/8436925?v=4)](https://github.com/tyxla "tyxla (339 commits)")[![stoyan0v](https://avatars.githubusercontent.com/u/22631418?v=4)](https://github.com/stoyan0v "stoyan0v (3 commits)")

---

Tags

wordpressconfigurationSettingscarbonadvancedadmindeveloperautotrailextendingbreadcrumbsbreadcrumbbeforeglueafter

### Embed Badge

![Health badge](/badges/tyxla-carbon-breadcrumbs/health.svg)

```
[![Health](https://phpackages.com/badges/tyxla-carbon-breadcrumbs/health.svg)](https://phpackages.com/packages/tyxla-carbon-breadcrumbs)
```

###  Alternatives

[redchamps/module-clean-admin-menu

It will merge all third party extensions menu items to single menu item named 'Extensions'.

164450.2k](/packages/redchamps-module-clean-admin-menu)[mineadmin/mineadmin

Quickly build a background management system for web applications

1.2k2.2k](/packages/mineadmin-mineadmin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
