Autogenerated breadcrumbs for WordPress.
This package is made to make it simple to add breadcrumbs to WordPress.
To get started install the package as described below in Installation.
To use the package have a look at Usage
Install with composer.
composer require morningtrain/wp-breadcrumbs
To get started with the module simply compose and render the breadcrumbs.
\Morningtrain\WP\Breadcrumbs\Breadcrumbs::compose()->render();You can change the seperator by calling seperator on the BreadcrumbGenerator.
\Morningtrain\WP\Breadcrumbs\Breadcrumbs::compose()->separator(' >> ')->render();You can easily hide the breadcrumbs on the frontpage by calling hideOnFrontPage on the BreadcrumbGenerator.
\Morningtrain\WP\Breadcrumbs\Breadcrumbs::compose()->hideOnFrontPage()->render();You can remove the prefixed front page breadcrumb on all pages by calling hidePrefixedFrontPagePart on the BreadcrumbGenerator.
\Morningtrain\WP\Breadcrumbs\Breadcrumbs::compose()->hidePrefixedFrontPagePart()->render();You can easily hide the terms from the breadcrumbs by using excludeTaxonomies on the BreadcrumbGenerator.
\Morningtrain\WP\Breadcrumbs\Breadcrumbs::compose()->excludeTaxonomies(['category'])->render();You can easily hide the post type archive from the breadcrumbs by using excludePostTypeArchives on the BreadcrumbGenerator.
\Morningtrain\WP\Breadcrumbs\Breadcrumbs::compose()->excludePostTypeArchives(['post'])->render();If you will create your own markup, you can get all breadcrumb parts by calling getBreadcrumbs on the BreadcrumbGenerator.
\Morningtrain\WP\Breadcrumbs\Breadcrumbs::compose()->getBreadcrumbs();The MIT License (MIT). Please see License File for more information.