Skip to content

Commit 5d4353c

Browse files
authored
Merge pull request #117 from mseymour/fix-rewrite-when-false
Ensure that the taxonomy's rewrite property is not false
2 parents e3d6661 + 314b3d6 commit 5d4353c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CPTP/Module/Permalink.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ public function term_link( $termlink, $term, $taxonomy ) {
418418
$termlink = str_replace( $wp_home, $wp_home . '/' . $slug, $termlink );
419419
}
420420

421-
if ( ! $taxonomy->rewrite['hierarchical'] ) {
421+
if ( $taxonomy->rewrite !== false && ! $taxonomy->rewrite['hierarchical'] ) {
422422
$termlink = str_replace( $term->slug . '/', CPTP_Util::get_taxonomy_parents_slug( $term->term_id, $taxonomy->name, '/', true ), $termlink );
423423
}
424424

0 commit comments

Comments
 (0)