>
// --- BOX ECOSISTEMA SAGA / GIOCO (Solo per gli articoli del blog) ---
if ( $post_type === 'post' ) {
$terms = get_the_terms( $post_id, 'franchise_gioco' );
if ( ! empty( $terms ) && ! is_wp_error( $terms ) ) {
$saga_term = $terms[0];
$games = get_posts([
'post_type' => 'gioco',
'posts_per_page' => 1,
'tax_query' => [
[
'taxonomy' => 'franchise_gioco',
'field' => 'term_id',
'terms' => $saga_term->term_id,
],
],
]);
if ( ! empty( $games ) ) {
$game = $games[0];
$game_title = get_the_title( $game->ID );
$game_permalink = get_permalink( $game->ID );
$game_thumb = get_the_post_thumbnail_url( $game->ID, 'thumbnail' );
echo '
';
if ( $game_thumb ) {
echo '
';
}
echo '
';
echo '
Ecosistema Saga: ' . esc_html( $saga_term->name ) . '';
echo '
';
echo '
Questo articolo fa parte della copertura ufficiale dedicata alla saga. Esplora la scheda tecnica completa.
';
echo '
';
echo '
';
}
}
}
// -------------------------------------------------------------------
the_content();
?>