1
0
mirror of https://github.com/ulaulaman/eduinaf.git synced 2025-02-27 23:57:42 +01:00

Aggiunto codice che previene errore nei custom post type

This commit is contained in:
ulaulaman 2020-10-22 19:25:43 +02:00
parent 2561249dea
commit a4116276e9

View File

@ -109,7 +109,13 @@ function tabspeciali($atts) {
$content = '<div id="recent-posts-2" class="widget widget_recent_entries">'.$header.'<ul>'.$content.'</ul></div>';
}
}
if ( get_post_type() == 'post' ) {
$out = $content;
} else {
$out = null;
}
return $content;
return $out;
}
add_shortcode( 'tabspeciali', 'tabspeciali' );