Making WordPress.org


Ignore:
Timestamp:
02/15/2022 12:41:23 AM (3 years ago)
Author:
coffee2code
Message:

Photo Directory: Ensure placeholders only potentially appear on the front page.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-photos/front-page.php

    r11553 r11554  
    2323    <?php
    2424    $placeholder_count = 0;
    25     $query_total = $GLOBALS['wp_query']->post_count;
    26     $min_grid_items = 12;
    27     // Show placeholders to ensure front page has a minimum number of grid items.
    28     if ( $query_total < $min_grid_items ) {
    29         $placeholder_count = $min_grid_items - $query_total;
     25    if ( ! is_paged() ) {
     26        $query_total = $GLOBALS['wp_query']->post_count;
     27        $min_grid_items = 12;
     28        // Show placeholders to ensure front page has a minimum number of grid items.
     29        if ( $query_total < $min_grid_items ) {
     30            $placeholder_count = $min_grid_items - $query_total;
     31        }
    3032    }
    3133
Note: See TracChangeset for help on using the changeset viewer.