diff --git a/includes/sites.php b/includes/sites.php index ab54466..e76a652 100644 --- a/includes/sites.php +++ b/includes/sites.php @@ -1,6 +1,6 @@ name; - return( html_entity_decode( $name ) ); + if ( $terms ) { + $first_term = array_slice( $terms, 0, 1 ); + $bare_term = array_shift( $first_term ); + $name = $bare_term->name; + return( html_entity_decode( $name ) ); + } else { + return null; + } }