astra_get_breadcrumb_trail( boolean $echo = true )

Shows a breadcrumb for all types of pages. This is a wrapper function for the Breadcrumb_Trail class, which should be used in theme templates.


Description


Parameters

$echo

(boolean) (Optional) Whether to echo or not.

Default value: true


Return

(string) Selected Breadcrumb.


Source

File: inc/addons/breadcrumbs/class-astra-breadcrumb-trail.php

function astra_get_breadcrumb_trail( $echo = true ) {

	$defaults = array(
		'before'      => '<div class="ast-breadcrumbs">',
		'after'       => '</div>',
		'show_browse' => false,
		'echo'        => $echo,
	);

	$args = apply_filters( 'astra_breadcrumb_trail_args', $defaults );

	$breadcrumb = apply_filters( 'astra_breadcrumb_trail_object', null, $args );

	if ( ! is_object( $breadcrumb ) ) {
		$breadcrumb = new Astra_Breadcrumb_Trail( $args );
	}

	return $breadcrumb->trail();
}

Changelog

Changelog
Version Description
1.8.1 Introduced.


User Contributed Notes

You must log in before being able to contribute a note or feedback.