diff --git wp-includes/template.php wp-includes/template.php
index d86a677..541dccd 100644
|
|
function get_404_template() { |
59 | 59 | * @return string |
60 | 60 | */ |
61 | 61 | function get_archive_template() { |
62 | | $post_types = get_query_var( 'post_type' ); |
| 62 | $post_types = (array) get_query_var( 'post_type' ); |
63 | 63 | |
64 | 64 | $templates = array(); |
65 | 65 | |
66 | | foreach ( (array) $post_types as $post_type ) |
| 66 | if ( count( $post_types ) == 1 ) { |
| 67 | $post_type = reset( $post_types ); |
67 | 68 | $templates[] = "archive-{$post_type}.php"; |
| 69 | } |
68 | 70 | $templates[] = 'archive.php'; |
69 | 71 | |
70 | 72 | return get_query_template( 'archive', $templates ); |