WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/15/2010 07:44:57 PM (9 years ago)
Author:
nacin
Message:

Custom post type archives, second pass. see #13818.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post-template.php

    r15651 r15819  
    408408        }
    409409    } elseif ( is_archive() ) {
    410         if ( is_author() ) {
     410        if ( is_post_type_archive() ) {
     411            $classes[] = 'post-type-archive';
     412            $classes[] = 'post-type-archive-' . sanitize_html_class( get_query_var( 'post_type' ) );
     413        } else if ( is_author() ) {
    411414            $author = $wp_query->get_queried_object();
    412415            $classes[] = 'author';
     
    473476        elseif ( is_search() )
    474477            $classes[] = 'search-paged-' . $page;
     478        elseif ( is_post_type_archive() )
     479            $classes[] = 'post-type-paged-' . $page;
    475480    }
    476481
Note: See TracChangeset for help on using the changeset viewer.