Astra_Breadcrumbs_Markup::astra_breadcumb_template()
Astra Breadcrumbs Template
Description
Loads template based on the style option selected in options panel for Breadcrumbs.
Return
(void)
Source
File: inc/addons/breadcrumbs/class-astra-breadcrumbs-markup.php
public function astra_breadcumb_template() {
$breadcrumb_position = astra_get_option( 'breadcrumb-position' );
$breadcrumb_enabled = false;
if ( is_singular() ) {
$breadcrumb_enabled = get_post_meta( get_the_ID(), 'ast-breadcrumbs-content', true );
}
if ( 'disabled' !== $breadcrumb_enabled && $breadcrumb_position && 'none' !== $breadcrumb_position && ! ( ( is_home() || is_front_page() ) && ( 'astra_entry_top' === $breadcrumb_position ) ) ) {
if ( self::astra_breadcrumb_rules() ) {
if ( ( is_archive() || is_search() ) && 'astra_entry_top' === $breadcrumb_position ) {
add_action( 'astra_before_archive_title', array( $this, 'astra_hook_breadcrumb_position' ), 15 );
} else {
add_action( $breadcrumb_position, array( $this, 'astra_hook_breadcrumb_position' ), 15 );
}
}
}
}
Expand full source code Collapse full source code View on Trac
Changelog
| Version | Description |
|---|---|
| 1.8.0 | Introduced. |