Skip to content

Commit 6ff0c3a

Browse files
committed
Updated custom taxonomy template hierachy to match WordPress standard system
1 parent 7fd7013 commit 6ff0c3a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

framework/Objects/Taxonomy.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,12 +236,12 @@ public function views( $template ) {
236236
if ( is_array( $post_type ) ) {
237237
$post_type = reset( $post_type );
238238
}
239-
$templates[] = "views/$post_type/archive-" . $this::$ID . '.php';
239+
$templates[] = "views/$post_type/taxonomy-" . $this::$ID . '.php';
240240
}
241241

242242
// search tax template inside all post types related to taxonomy.
243243
foreach ( $this->post_types as $post_type ) {
244-
$templates[] = "views/$post_type/archive-" . $this::$ID . '.php';
244+
$templates[] = "views/$post_type/taxonomy-" . $this::$ID . '.php';
245245
}
246246

247247
$templates = array_unique( $templates );

framework/Web/Template_Hierarchy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ protected function extend_template_hierarchy( $type, $templates ) {
124124
* Generate views for custom page templates set from admin.
125125
* It search for page template set from admin. If it was deleted - then load generic page template
126126
*
127-
* @param array $std_templates Standard Wordpress templates.
127+
* @param array $std_templates Standard WordPress templates.
128128
*
129129
* @return array
130130
*/

0 commit comments

Comments
 (0)