WordPress.org

Make WordPress Core

Ticket #20867: 20867.2.patch

File 20867.2.patch, 541 bytes (added by SergeyBiryukov, 3 years ago)
  • wp-includes/template.php

     
    5959 * @return string 
    6060 */ 
    6161function get_archive_template() { 
    62         $post_type = get_query_var( 'post_type' ); 
     62        $post_types = get_query_var( 'post_type' ); 
    6363 
    6464        $templates = array(); 
    6565 
    66         if ( $post_type ) 
     66        foreach ( (array) $post_types as $post_type ) 
    6767                $templates[] = "archive-{$post_type}.php"; 
    6868        $templates[] = 'archive.php'; 
    6969