diff --git a/themes/osi/template-parts/breadcrumbs.php b/themes/osi/template-parts/breadcrumbs.php index 409ee59..1b12085 100644 --- a/themes/osi/template-parts/breadcrumbs.php +++ b/themes/osi/template-parts/breadcrumbs.php @@ -8,7 +8,31 @@ $post_type = is_page() ? 'page' : get_query_var( 'post_type' ); $is_post_type_hierarchical = is_post_type_hierarchical( $post_type ); + // Special handling for podcast post type + if ( $post_type === 'podcast' ) { + $breadcrumb = ''; + $position = 1; + $podcast_archive_url = home_url( '/ai/podcast/' ); + + if ( is_archive() || is_post_type_archive( 'podcast' ) ) { + $breadcrumb .= 'Podcast'; + } else { + $breadcrumb .= 'Podcast'; + ++$position; + + $post_id = get_queried_object_id(); + $breadcrumb .= '' . esc_html( get_the_title( $post_id ) ) . ''; + } + + $home = '' . esc_html__( 'Home', 'jetpack' ) . ''; + + echo ''; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + echo ''; // Close the breadcrumb area + return; + } + if ( ! ( $is_post_type_hierarchical || $is_taxonomy_hierarchical ) || is_front_page() ) { + echo ''; // Close the breadcrumb area return; }