| @@ -22,9 +22,9 @@ | ||
| 22 | 22 | // Get term from context or from the current query. |
| 23 | 23 | if ( isset( $block->context['termId'] ) && isset( $block->context['taxonomy'] ) ) { |
| 24 | 24 | $term = get_term( $block->context['termId'], $block->context['taxonomy'] ); |
| 25 | 25 | if ( $term && ! is_wp_error( $term ) ) { |
| 26 | - $term_description = $term->description; | |
| 26 | + $term_description = get_term_field( 'description', $term ); | |
| 27 | 27 | } |
| 28 | 28 | } elseif ( is_category() || is_tag() || is_tax() ) { |
| 29 | 29 | $term_description = term_description(); |
| 30 | 30 | } |