| @@ -32,9 +32,9 @@ | ||
| 32 | 32 | if ( ! $term || is_wp_error( $term ) ) { |
| 33 | 33 | return ''; |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | - $term_name = $term->name; | |
| 36 | + $term_name = get_term_field( 'name', $term ); | |
| 37 | 37 | $level = $attributes['level'] ?? 0; |
| 38 | 38 | $tag_name = 0 === $level ? 'p' : 'h' . (int) $level; |
| 39 | 39 | |
| 40 | 40 | if ( isset( $attributes['isLink'] ) && $attributes['isLink'] ) { |