Skip to content

Commit

Permalink
Make sure a podcase has a show associated before trying to retrieve t…
Browse files Browse the repository at this point in the history
…he podcast show term
  • Loading branch information
sudar committed Sep 9, 2024
1 parent df76f5b commit ec5b8dc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion includes/blocks/podcast/markup.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@
$episode_type = get_post_meta( $post_id, 'podcast_episode_type', true );
$episode_number = get_post_meta( $post_id, 'podcast_episode_number', true );
$season_number = get_post_meta( $post_id, 'podcast_season_number', true );
$term_image_id = get_term_meta( $podcast_show->term_id, 'podcasting_image', true );
if ( is_a( $podcast_show, 'WP_Term' ) ) {
$term_image_id = get_term_meta( $podcast_show->term_id, 'podcasting_image', true );
} else {
$term_image_id = '';
}

?>
<div class="wp-block-podcasting-podcast-outer">
Expand Down

0 comments on commit ec5b8dc

Please sign in to comment.