$thumbnail_post = get_post($thumbnail_id);
$caption = $thumbnail_post->post_excerpt;
if ($caption) {
echo ‘
‘ . wp_kses_post($caption) . ‘
‘;
}
}
?>
‘ . esc_html($artist->name) . ‘‘;
}
}
echo ‘
Stage Name: ‘ . implode(‘, ‘, $artist_links) . ‘
Birth Name: ‘ . esc_html($artist_full_name) . ‘
Place of Birth: ‘ . esc_html($place_of_birth) . ‘
Date of Birth: ‘ . esc_html($date_of_birth_formatted) . ‘
Died: ‘ . esc_html($date_of_death_formatted) . ‘ (‘ . esc_html($age_at_death) . ‘ years)
Years Lived: ‘ . esc_html($birth_date->format(‘Y’)) . ‘ – ‘ . esc_html($death_date->format(‘Y’)) . ‘
Age: ‘ . esc_html($age) . ‘
Genres: ‘ . implode(‘, ‘, $genre_links) . ‘
‘;
}
// Get Artist Full Name
$artist_full_name = get_post_meta(get_the_ID(), ‘_artist_full_name’, true);
$place_of_birth = get_post_meta(get_the_ID(), ‘_place_of_birth’, true);
// Display Artist Full Name
if (!empty($artist_full_name)) {
echo ‘
‘;
}
// Display Place of Birth
if (!empty($place_of_birth)) {
echo ‘
‘;
}
// Get Date of Birth
$date_of_birth = get_post_meta(get_the_ID(), ‘_date_of_birth’, true);
$artist_is_dead = get_post_meta(get_the_ID(), ‘_artist_is_dead’, true);
$date_of_death = get_post_meta(get_the_ID(), ‘_date_of_death’, true);
// Display Date of Birth
if (!empty($date_of_birth)) {
$date_of_birth_formatted = date_i18n(get_option(‘date_format’), strtotime($date_of_birth));
echo ‘
‘;
// Check if artist is dead
if ($artist_is_dead && !empty($date_of_death)) {
$date_of_death_formatted = date_i18n(get_option(‘date_format’), strtotime($date_of_death));
$birth_date = new DateTime($date_of_birth);
$death_date = new DateTime($date_of_death);
$age_at_death = $death_date->diff($birth_date)->y;
echo ‘
‘;
echo ‘
‘;
} else {
// Calculate Age
$birth_date = new DateTime($date_of_birth);
$current_date = new DateTime();
$age = $current_date->diff($birth_date)->y;
echo ‘
‘;
}
}
// Get the terms for the “genres” taxonomy
$genres = get_the_terms(get_the_ID(), ‘genres’);
if ($genres && !is_wp_error($genres)) {
$genre_links = array();
foreach ($genres as $genre) {
$genre_link = get_term_link($genre);
if (!is_wp_error($genre_link)) {
$genre_links[] = ‘‘ . esc_html($genre->name) . ‘‘;
}
}
echo ‘
‘;
}
?>
Reason for report?