Changeset 11651
- Timestamp:
- 03/08/2022 07:03:14 PM (3 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/archive-course.php
r11567 r11651 17 17 18 18 <main id="main" class="site-main"> 19 <?php get_template_part( 'template-parts/component', 'breadcrumbs' ); ?> 20 19 21 <section> 20 22 <div class="row align-middle between section-heading section-heading--with-space"> -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/archive-lesson-plan.php
r10513 r11651 13 13 14 14 <main id="main" class="site-main"> 15 <?php get_template_part( 'template-parts/component', 'breadcrumbs' ); ?> 16 15 17 <section> 16 18 <div class="row align-middle between section-heading section-heading--with-space"> -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/archive-wporg_workshop.php
r11278 r11651 20 20 21 21 <main id="main" class="site-main"> 22 <?php get_template_part( 'template-parts/component', 'breadcrumbs' ); ?> 23 22 24 <section> 23 25 <div class="row align-middle between section-heading section-heading--with-space"> -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/search.php
r10513 r11651 19 19 20 20 <main id="main" class="site-main type-page" role="main"> 21 <?php get_template_part( 'template-parts/component', 'breadcrumbs' ); ?> 22 21 23 <section> 22 24 <div class="row align-middle between section-heading section-heading--with-space"> -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/single-wporg_workshop.php
r10867 r11651 10 10 11 11 <main id="main" class="site-main page-full-width" role="main"> 12 <?php get_template_part( 'template-parts/component', 'breadcrumbs' ); ?> 13 12 14 <?php 13 15 while ( have_posts() ) { -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/template-parts/component-breadcrumbs.php
r10513 r11651 15 15 ); 16 16 17 // Get information about the post title. 18 $cpt_object = get_post_type_object( get_post_type( get_queried_object() ) ); 17 if ( is_post_type_archive() ) { 18 array_push( $crumbs, array( 19 'label' => post_type_archive_title( '', false ), 20 'url' => '', 21 )); 22 } elseif ( is_singular() ) { 23 if ( is_single() ) { 24 $cpt_object = get_post_type_object( get_post_type() ); 19 25 20 if ( 'lesson-plan' === get_post_type() ) { 26 array_push($crumbs, array( 27 'label' => $cpt_object->label, 28 'url' => home_url( $cpt_object->has_archive ), 29 )); 30 } 21 31 array_push( $crumbs, array( 22 'label' => ucfirst( $cpt_object->labels->name),23 'url' => home_url( $cpt_object->has_archive ),32 'label' => get_the_title(), 33 'url' => '', 24 34 ) ); 35 } elseif ( is_search() ) { 36 array_push( $crumbs, array( 37 'label' => get_search_query(), 38 'url' => '', 39 )); 25 40 } 26 27 array_push( $crumbs, array(28 'label' => get_the_title(),29 'url' => '',30 ) );31 41 ?> 32 42
Note: See TracChangeset
for help on using the changeset viewer.