Build and display breadcrumbs for WordPress pages
Install via composer:
composer require grottopress/wordpress-breadcrumbs
<?php
declare (strict_types = 1);
use GrottoPress\WordPress\Breadcrumbs;
use GrottoPress\WordPress\Page;
// Instantiate
$breadcrumbs = new Breadcrumbs(new Page(), [
'home_label' => \esc_html__('Home'),
'delimiter' => '/',
'before' => \esc_html__('Path: '),
]);
// Render
$breadcrumbs->render();
Run tests with composer run test
.
- Fork it
- Switch to the
master
branch:git checkout master
- Create your feature branch:
git checkout -b my-new-feature
- Make your changes, updating changelog and documentation as appropriate.
- Commit your changes:
git commit
- Push to the branch:
git push origin my-new-feature
- Submit a new Pull Request against the
GrottoPress:master
branch.