From 4c64b3a4b9b73bfdf78c29f981f16448df506621 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Sat, 15 Sep 2012 20:07:15 +0000 Subject: [PATCH] Expect a possible array of post types in get_archive_template(). props SergeyBiryukov. fixes #20867. git-svn-id: http://core.svn.wordpress.org/trunk@21861 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/template.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/template.php b/wp-includes/template.php index 531b308d24..8281858c04 100644 --- a/wp-includes/template.php +++ b/wp-includes/template.php @@ -59,11 +59,11 @@ function get_404_template() { * @return string */ function get_archive_template() { - $post_type = get_query_var( 'post_type' ); + $post_types = get_query_var( 'post_type' ); $templates = array(); - if ( $post_type ) + foreach ( (array) $post_types as $post_type ) $templates[] = "archive-{$post_type}.php"; $templates[] = 'archive.php';