Making WordPress.org


Ignore:
Timestamp:
09/16/2020 10:07:05 PM (6 years ago)
Author:
coreymckrill
Message:

WordPress.org Learn: Sync with GitHub

​https://github.com/WordPress/learn/compare/41d65294a2e67cf35a5b799d179f2e6f53b58b48...fb8968a2cbd50fc4c1a8764586731e903577d3f3

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
     2global $wp_query;
     3$is_filtered = $wp_query->get( 'wporg_workshop_filters' );
     4
     5get_header(); ?>
    26
    37<main class="site-main">
    48        <section>
    59                <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() ) :
    913                                $series_term = wporg_workshop_series_get_term( $post );
    1014                                ?>
    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>
    1218                        <?php endif; ?>
    1319                </div>
    1420                <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' ); ?>
    1823                <?php endif; ?>
    19                 <?php get_template_part( 'template-parts/component', 'video-grid' ); ?>
    2024
    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; ?>
    2238        </section>
    2339        <hr>
Note: See TracChangeset for help on using the changeset viewer.