diff --git a/inc/helpers/namespace.php b/inc/helpers/namespace.php index 040cf2f..8f521ba 100644 --- a/inc/helpers/namespace.php +++ b/inc/helpers/namespace.php @@ -8,6 +8,7 @@ namespace Aldine\Helpers; use function \Pressbooks\Metadata\book_information_to_schema; +use function \Pressbooks\Metadata\is_bisac; use Pressbooks\Book; /** @@ -148,7 +149,7 @@ function get_available_licenses( $catalog_data ) { function get_available_subjects( $catalog_data ) { $subjects = []; foreach ( $catalog_data['books'] as $book ) { - if ( ! empty( $book['subject'] ) ) { + if ( ! empty( $book['subject'] ) && ! is_bisac( $book['subject'] ) ) { $subjects[ substr( $book['subject'], 0, 1 ) ][] = substr( $book['subject'], 0, 2 ); } } diff --git a/partials/book.php b/partials/book.php index 4445ace..6e37702 100644 --- a/partials/book.php +++ b/partials/book.php @@ -1,7 +1,10 @@ - +