Your code looks much better and all your bugs are fixed :-). (Caveat: I did not go through your code line by line, just quickly tested it though)
There are however two problems left that you’ve missed, and that all come from when you’ve renamed your widget
-
register_widget( 'header_slide' );
should beregister_widget( 'Header_Slide' );
-
the_widget( 'header_slide');
should bethe_widget( 'Header_Slide');
Please see the_widget()
and how it is used. Just for example, the following
the_widget( 'Header_Slide', 'headline1=HEADLINE1&blurb1=BLURB1');
will output
HEADLINE1
BLURB1
I would however not use the_widget()
to display a widget, I would rather create a sidebar and then drop my widget in there.
You can register a sidebar conditionally for a specific page of template