Changeset 2755 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/index.php
- Timestamp:
- 03/17/2016 05:39:02 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/index.php
r1813 r2755 12 12 */ 13 13 14 global $themes;15 16 14 get_header(); 17 15 ?> … … 19 17 <div class="wp-filter"> 20 18 <div class="filter-count"> 21 <span class="count theme-count"><?php echo number_format_i18n( $ themes['total']); ?></span>19 <span class="count theme-count"><?php echo number_format_i18n( $wp_query->found_posts ); ?></span> 22 20 </div> 23 21 … … 67 65 <?php 68 66 if ( get_query_var('name') && !is_404() ) { 69 $theme = reset( $themes['themes'] ); 70 include __DIR__ . '/theme-single.php'; 67 while ( have_posts() ) { 68 the_post(); 69 $theme = wporg_themes_theme_information( $post->post_name ); 70 include __DIR__ . '/theme-single.php'; 71 } 71 72 } else { 72 foreach ( $themes['themes'] as $theme ) { 73 while ( have_posts() ) { 74 the_post(); 75 $theme = wporg_themes_theme_information( $post->post_name ); 73 76 include __DIR__ . '/theme.php'; 74 77 } 75 78 76 79 // Add the navigation between pages 77 if ( $themes['pages'] > 1 ) { 78 echo '<nav class="posts-navigation">'; 79 echo paginate_links( array( 80 'total' => $themes['pages'], 81 'mid_size' => 3, 82 ) ); 83 echo '</nav>'; 84 } 80 echo '<nav class="posts-navigation">'; 81 echo paginate_links( array( 82 'mid_size' => 3, 83 ) ); 84 echo '</nav>'; 85 85 } 86 86 ?> 87 87 </div> 88 88 89 <?php /* TODO: Don't display this for no-js queries where $wp_query->post_count > 0, but JS needs it too. */ ?> 89 90 <p class="no-themes"><?php _e( 'No themes found. Try a different search.', 'wporg-themes' ); ?></p> 90 91 </div>
Note: See TracChangeset
for help on using the changeset viewer.