Skip to content

Commit

Permalink
Merge pull request #148 from devgeniem/taxonomy-archives
Browse files Browse the repository at this point in the history
Fix taxonomy archives
  • Loading branch information
Otto Rautamaa authored Jun 22, 2021
2 parents 1c5eab3 + de794d4 commit 1704c7c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Fixed
- Fix archive pages for custom taxonomies when filtering with another taxonomy.
- Fix a variable typo
## [1.34.0] - 2021-06-10

### Changed
Expand Down
14 changes: 7 additions & 7 deletions dustpress.php
Original file line number Diff line number Diff line change
Expand Up @@ -458,14 +458,14 @@ private function get_template_filename( &$debugs = array() ) {
}

if ( is_tax() ) {
$term_id = get_queried_object()->term_id;
$term = get_term_by( 'id', $term_id, get_query_var( 'taxonomy' ) );

$term = get_queried_object();

$hierarchy[ 'is_tax' ] = [
'Taxonomy' . $this->dashed_to_camelcase( get_query_var( 'taxonomy' ), '_' ) . $this->dashed_to_camelcase( $term->slug ),
'Taxonomy' . $this->dashed_to_camelcase( get_query_var( 'taxonomy' ) ) . $this->dashed_to_camelcase( $term->slug ),
'Taxonomy' . $this->dashed_to_camelcase( get_query_var( 'taxonomy' ), '_' ),
'Taxonomy' . $this->dashed_to_camelcase( get_query_var( 'taxonomy' ) ),
'Taxonomy' . $this->dashed_to_camelcase( $term->taxonomy, '_' ) . $this->dashed_to_camelcase( $term->slug ),
'Taxonomy' . $this->dashed_to_camelcase( $term->taxonomy ) . $this->dashed_to_camelcase( $term->slug ),
'Taxonomy' . $this->dashed_to_camelcase( $term->taxonomy, '_' ),
'Taxonomy' . $this->dashed_to_camelcase( $term->taxonomy ),
'Taxonomy',
'Archive'
];
Expand All @@ -490,7 +490,7 @@ private function get_template_filename( &$debugs = array() ) {
if ( is_attachment() ) {
$mime_type = get_post_mime_type( get_the_ID() );

$hiearchy[ 'is_attachment' ] = [
$hierarchy[ 'is_attachment' ] = [
function() use ( $mime_type ) {
if ( preg_match( '/^image/', $mime_type ) && class_exists( 'Image' ) ) {
return 'Image';
Expand Down

0 comments on commit 1704c7c

Please sign in to comment.