mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Custom post type archives. see #13818.
git-svn-id: https://develop.svn.wordpress.org/trunk@15803 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -781,7 +781,15 @@ function get_404_template() {
|
||||
* @return string
|
||||
*/
|
||||
function get_archive_template() {
|
||||
return get_query_template('archive');
|
||||
$post_type = get_query_var( 'post_type' );
|
||||
|
||||
$templates = array();
|
||||
|
||||
if ( $post_type )
|
||||
$templates[] = "archive-{$post_type}.php";
|
||||
$templates[] = 'archive.php';
|
||||
|
||||
return get_query_template( 'archive', $templates );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user