Changeset 10272 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/archive-wporg_workshop.php
- Timestamp:
- 09/16/2020 10:07:05 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/archive-wporg_workshop.php
r10202 r10272 1 <?php get_header(); ?> 1 <?php 2 global $wp_query; 3 $is_filtered = $wp_query->get( 'wporg_workshop_filters' ); 4 5 get_header(); ?> 2 6 3 7 <main class="site-main"> 4 8 <section> 5 9 <div class="row align-middle between section-heading section-heading--with-space"> 6 <?php the_archive_title( '<h1 class="section-heading_title h2 col-9">', '</h1>' ); ?>7 < a class="section-heading_link button button-large" href="https://learn.wordpress.org/workshop-presenter-application/"><?php esc_html_e( 'Submit Workshop Idea', 'wporg-learn' ); ?></a>8 <?php if ( is_tax( ) ) :10 <?php the_archive_title( '<h1 class="section-heading_title h2">', '</h1>' ); ?> 11 <?php get_template_part( 'template-parts/component', 'workshop-search' ); ?> 12 <?php if ( is_tax( 'wporg_workshop_series' ) && have_posts() ) : 9 13 $series_term = wporg_workshop_series_get_term( $post ); 10 14 ?> 11 <?php echo wp_kses_post( wpautop( term_description( $series_term->term_id ) ) ); ?> 15 <div class="section-heading_description col-12"> 16 <?php echo wp_kses_post( wpautop( term_description( $series_term->term_id ) ) ); ?> 17 </div> 12 18 <?php endif; ?> 13 19 </div> 14 20 <hr> 15 <?php // Only show the featured workshop on the first page of post type archives. 16 if ( is_post_type_archive() && get_query_var( 'paged' ) < 2 ) : ?> 17 <?php get_template_part( 'template-parts/component', 'featured-workshop' ); ?> 21 <?php if ( is_post_type_archive( 'wporg_workshop' ) ) : ?> 22 <?php get_template_part( 'template-parts/component', 'workshop-filters' ); ?> 18 23 <?php endif; ?> 19 <?php get_template_part( 'template-parts/component', 'video-grid' ); ?>20 24 21 <?php the_posts_pagination(); ?> 25 <?php if ( have_posts() ) : ?> 26 <?php // Only show the featured workshop on the first page of post type archives. 27 if ( is_post_type_archive() && get_query_var( 'paged' ) < 2 && ! $is_filtered ) : ?> 28 <?php get_template_part( 'template-parts/component', 'featured-workshop' ); ?> 29 <?php endif; ?> 30 <?php get_template_part( 'template-parts/component', 'video-grid' ); ?> 31 32 <?php the_posts_pagination(); ?> 33 <?php else : ?> 34 <p> 35 <?php esc_html_e( 'No workshops were found.', 'wporg-learn' ); ?> 36 </p> 37 <?php endif; ?> 22 38 </section> 23 39 <hr>
Note: See TracChangeset
for help on using the changeset viewer.