'.$navItem->title.'';
}
$menu = ''.$nav.'
';
$out = $menu;
return $out;
} );
# sidebar
add_shortcode( 'sbcostellazioni', function () {
$custom = get_post_custom();
if ( empty($custom) ) {
$out = null;
} else {
foreach( $custom as $key => $value ) {
$key_name = get_post_custom_values( $key = 'ascensione_retta_centrale' );
$field1 = 'Ascensione retta centrale: '.$key_name[0].'
';
$key_name = get_post_custom_values( $key = 'declinazione_centrale' );
$field2 = 'Declinazione centrale: '.$key_name[0].'
';
$key_name = get_post_custom_values( $key = 'urlmappa' );
$mappa = '![]('.$key_name[0].')
';
if ( $key_name[1] <> null ) {
$mappa1 = '![]('.$key_name[1].')
';
} else { $mappa1 = null; }
if ( $key_name[2] <> null ) {
$mappa2 = '![]('.$key_name[2].')
';
} else { $mappa2 = null; }
}
$out = $mappa.$mappa1.$mappa2.$field1.$field2;
}
$type = 'emisfero ';
$terms = get_the_terms ( $post->ID, 'emisfero' );
if ( empty($terms) ) {
$type = null;
} else {
$numcat = sizeof( $terms );
$i = 0;
foreach ( $terms as $term ) {
$term_link = get_term_link( $term, 'emisfero' );
$i++;
if ( $i < $numcat ) {
$type = $type.''.$term->name.', ';
} else {
$type = $type.''.$term->name.'';
}
}
$out = $out.'Visibile in: '.$type.'
';
}
$terms = get_the_terms ( $post->ID, 'stagione' );
if ( empty($terms) ){
$season = null;
} else {
$numcat = sizeof( $terms );
if ( $numcat > 1 ) {
$season = 'Stagioni: ';
} else {
$season = 'Stagione: ';
}
$i = 0;
foreach ( $terms as $term ) {
$term_link = get_term_link( $term, 'stagione' );
$i++;
if ( $i < $numcat ) {
$season = $season.''.$term->name.', ';
} else {
$season = $season.''.$term->name.'';
}
}
$out = $out.''.$season.'
';
}
$auth = do_shortcode('[blog-post-coauthors]');
$cura = ''.$auth.'
';
$out = $out.$cura;
return $out;
} );