Making WordPress.org


Ignore:
Timestamp:
02/09/2024 03:15:54 AM (16 months ago)
Author:
dd32
Message:

Plugin Directory: Allow tags to be filtered by taxonomies.

This adjusts the styles and templates to simplify the behaviour, allowing for an "empty" archive to be displayed.

Closes https://github.com/WordPress/wordpress.org/pull/198.
See #7430.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/archive.php

    r8204 r13196  
    2121        <main id="main" class="site-main" role="main">
    2222
    23         <?php if ( have_posts() ) : ?>
     23        <header class="page-header">
     24            <?php
     25            the_archive_title( '<h1 class="page-title">', '</h1>' );
     26            the_archive_description( '<div class="taxonomy-description">', '</div>' );
     27            ?>
     28        </header><!-- .page-header -->
    2429
    25             <header class="page-header">
    26                 <?php
    27                 the_archive_title( '<h1 class="page-title">', '</h1>' );
    28                 the_archive_description( '<div class="taxonomy-description">', '</div>' );
    29                 ?>
    30             </header><!-- .page-header -->
     30        <?php
     31        /* Start the Loop */
     32        while ( have_posts() ) :
     33            the_post();
    3134
    32             <?php
    33             /* Start the Loop */
    34             while ( have_posts() ) :
    35                 the_post();
     35            /*
     36                * Include the Post-Format-specific template for the content.
     37                * If you want to override this in a child theme, then include a file
     38                * called content-___.php (where ___ is the Post Format name) and that will be used instead.
     39                */
     40            get_template_part( 'template-parts/plugin' );
    3641
    37                 /*
    38                  * Include the Post-Format-specific template for the content.
    39                  * If you want to override this in a child theme, then include a file
    40                  * called content-___.php (where ___ is the Post Format name) and that will be used instead.
    41                  */
    42                 get_template_part( 'template-parts/plugin' );
     42        endwhile;
     43        if ( ! have_posts() ) {
     44            get_template_part( 'template-parts/no-results' );
     45        }
    4346
    44             endwhile;
     47        the_posts_pagination();
    4548
    46             the_posts_pagination();
    47 
    48         else :
    49 
    50             get_template_part( 'template-parts/content', 'none' );
    51 
    52         endif;
    5349        ?>
    5450
Note: See TracChangeset for help on using the changeset viewer.