I created and registered widget. Everything looks cool with no errors. However, if i want to display widget by name for example in header (i am using custom widget area), it does not work. It creates all divs, but with no data included. If i am using code to display all widgets in that area - it works.
Question:
How to display widget by name?
Codes:
it displays all custom widgets in that area
<?php if ( is_active_sidebar( 'header-widget' ) ) : ?>
<?php dynamic_sidebar( 'header-widget' ); ?>
<?php endif; ?>
Codex says, that this should work. However, it does not.
<?php the_widget( 'widget_simple' ); ?>
Thanks for any answers and sorry for bad english.