From 383487466b460cbcc65aea66465fd7cd0ba28c2d 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: https://develop.svn.wordpress.org/trunk@21861 602fd350-edb4-49c9-b593-d223f7449a82 --- 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';