grottopress/wordpress-breadcrumbs

Build and display breadcrumbs for WordPress pages

v1.0.0 2023-05-31 17:36 UTC

This package is auto-updated.

Last update: 2024-03-23 14:06:28 UTC


README

Build and display breadcrumbs for WordPress pages

Installation

Install via composer:

composer require grottopress/wordpress-breadcrumbs

Usage

<?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();

Development

Run tests with composer run test.

Contributing

  1. Fork it
  2. Switch to the master branch: git checkout master
  3. Create your feature branch: git checkout -b my-new-feature
  4. Make your changes, updating changelog and documentation as appropriate.
  5. Commit your changes: git commit
  6. Push to the branch: git push origin my-new-feature
  7. Submit a new Pull Request against the GrottoPress:master branch.