tested and working.
For those who want to add a new widget area and not just duplicate "single-insert widget", try this code:
//ADD new widget for widget-inside
function my_widgets_init() {
register_sidebar(array(
'name' => 'Widget Inside',
'id' => 'Widget Inside',
'before_widget' => '<li id="%1$s" class="widgetcontainer %2$s">',
'after_widget' => "\n",
'before_title' => "<h3 class=\"widgettitle\">",
'after_title' => "</h3>\n",
));
}
add_action( 'init', 'my_widgets_init' );
//End Widget-insdie code
//Widget inside post
function widget_insidepost() {
// This is pretty weird, but it works. We start the cache ..
ob_start();
// .. *yikes* .. can't remember if this is SVN revision only or not .. it displays the CSS markup before the widget area
echo thematic_before_widget_area('widget-inside');
// .. I know .. I'm lazy. I duplicated the single insert widget area.
dynamic_sidebar('widget-inside');
// .. see comment above .. it displays the CSS markup after the widget area
echo thematic_after_widget_area('widget-inside');
// Put everything from the black cauldron into $widget_inside
$widget_inside = ob_get_contents();
// end that caching process
ob_end_clean();
// return the ingredients
return $widget_inside;
}
// Let's do some magic and exchange [widget-inside] against the ingredients
add_shortcode('widget-inside', 'widget_insidepost');
The original code simply duplicates the "single-insert" inside the post. I added a code to create a new widgetized area and edited Chris' code to display the "widget-inside" widget instead of single-insert.
And if you want to save some time in writing "[widget-inside]" for every new post, add this code in your functions.php file as well:
function my_default_post_content()
{
$dpc = '[widget-inside]';
return $dpc;
}
add_filter('default_content', 'my_default_post_content');