A PHP class to generate seo friendly breadcrumbs in WordPress Themes
- Page
- Post
- Custom Post Type
- Category term archive
- Tag term archive
- Custom Taxonomy archive
- Author archive
- Date archive
- Search results page
- Pagination
- 404
- Accessibility
To view the breadcrumbs you need to create an instance of Wp_Breadcrumb as follows:
<?php
require_once 'class-wp-breadcrumb.php';
$breadcrumb = new Wp_Breadcrumb();
$breadcrumb->display();
?>
<?php
require_once 'class-wp-breadcrumb.php';
$breadcrumb = new Wp_Breadcrumb('>', 'breadcrumb', 'breadcrumb_item');
$breadcrumb->display();
?>