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
This commit is contained in:
parent
9da4708e6d
commit
383487466b
@ -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';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user