PHP code example of justintadlock / hybrid-breadcrumbs
1. Go to this page and download the library: Download justintadlock/hybrid-breadcrumbs library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
justintadlock / hybrid-breadcrumbs example snippets
if ( file_exists( get_parent_theme_file_path( 'vendor/autoload.php' ) ) ) {
Hybrid\Breadcrumbs\Trail::display();
// Returns a new instance of the Hybrid\Breadcrumbs\Breadcrumbs class.
Trail::breadcrumbs( array $args = [] );
// Makes a breadcrumb trail and returns an instance of the Hybrid\Breadcrumbs\Breadcrumbs.
Trail::make( array $args = [] );
// Returns an array of Hybrid\Breadcrumbs\Crumb\* objects.
Trail::all( array $args = [] );
// Displays the HTML output of the breadcrumb trail if it exists.
Trail::display( array $args = [] );
// Returns the HTML output of the breadcrumb trail or an empty string.
Trail::render( array $args = [] );
// Create a new Breadcrumbs object.
$trail = new \Hybrid\Breadcrumbs\Breadcrumbs( array $args = [] );
// Makes the breadcrumb trail and returns an instance of the object.
$trail->make();
// Returns an array of Hybrid\Breadcrumbs\Crumb\* objects.
$trail->all();
// Displays the HTML output of the breadcrumb trail if it exists.
$trail->display();
// Returns the HTML output of the breadcrumb trail or an empty string.
$trail->render();