Ciao Johan,
this is the content of my “custom-post-widget.php” in my theme folder:
if ( !$apply_content_filters ) { // Don't apply the content filter if checkbox selected
$content = apply_filters( 'the_content', $content);
}
echo $before_widget;
$id = $content_post -> ID;
echo 'this is the id:'.$id;
if ($id == 60) {
include( get_stylesheet_directory() ."/custom-post-widget-candidatura.php");
} else {
if ( $show_custom_post_title ) {
echo $before_title;
echo apply_filters( 'widget_title',$content_post->post_title);
if ( $show_featured_image ) {
echo get_the_post_thumbnail( $content_post -> ID );
}
echo $after_title;
}
echo do_shortcode( $content );
}
echo $after_widget;
and using php shortcode to include in my page:
echo do_shortcode('[content_block id="60"]')
but cant see neither the echo “this is the id”, like is not reading the file “custom-post-widget.php”
Thanks