Skip to content

Commit fa18347

Browse files
authored
Merge pull request #377 from BeAPI/feature/breadcrumb-part
feat (breadcrumb): add template part
2 parents 0e974d1 + 0ae86f6 commit fa18347

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
if ( ! function_exists( 'yoast_breadcrumb' ) ) {
3+
return;
4+
}
5+
?>
6+
7+
<nav class="breadcrumb" role="navigation" aria-label="<?php echo esc_attr( 'Breadcrumb', 'beapi-frontend-framework' ); ?>">
8+
<div class="container">
9+
<?php yoast_breadcrumb( '<div class="breadcrumb__inner">', '</div>' ); ?>
10+
</div>
11+
</nav>

header.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,7 @@ function replaceHtmlClass(regexp, str) {
3232
get_template_part( 'components/parts/common/header' );
3333
?>
3434
<main id="content" role="main" tabindex="-1" aria-label="<?php esc_attr_e( 'Main content', 'beapi-frontend-framework' ); ?>">
35+
<?php
36+
if ( ! is_front_page() && ! is_search() ) {
37+
get_template_part( 'components/parts/common/breadcrumb' );
38+
}

0 commit comments

Comments
 (0)