From a4116276e98a9ec3a1aa82507c7f0ec64e0022fe Mon Sep 17 00:00:00 2001 From: ulaulaman Date: Thu, 22 Oct 2020 19:25:43 +0200 Subject: [PATCH] Aggiunto codice che previene errore nei custom post type --- incl/speciali.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/incl/speciali.php b/incl/speciali.php index e87c1f4..82805de 100644 --- a/incl/speciali.php +++ b/incl/speciali.php @@ -109,7 +109,13 @@ function tabspeciali($atts) { $content = '
'.$header.'
'; } } + + if ( get_post_type() == 'post' ) { + $out = $content; + } else { + $out = null; + } - return $content; + return $out; } add_shortcode( 'tabspeciali', 'tabspeciali' );