Your widget
method does not echo anything. If you want content to show up the widget needs to echo content.
function widget( $args, $instance ) {
extract( $args );
/* Our variables from the widget settings. */
if(isset($instance))
{
if( isset( $instance[ 'title' ] ) ) {
$title = apply_filters( 'widget_title', $instance[ 'title' ] );
// try this
echo $title;
}
if( isset( $instance[ 'template' ] ) ) {
$template = htmlspecialchars_decode( $instance[ 'template' ] );
// try this
echo $template;
}
}
}
That is probably not the format you want but it should display your content. Be aware that widgets support several parameters such as $before_title
and after_title
. While you don’t have to use those, it is generally a good idea.