Placing widget to menu

you can register a new sidebar, add it to the menu area and then add a widget to it:
you can register a sidebar by adding this function to your functions.php:

register_sidebar( array(
        'name' => __( 'Site Stat Widget'),
        'id' => 'stat-widget',
        'description' => __( 'The Site Stat Widget'),
        'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
        'after_widget' => '</li>',
        'before_title' => '<h3 class="widget-title">',
        'after_title' => '</h3>',
    ) );

And add the function below to the menu area (i believe within the #openclosecontent div probably in header.php) :

<?php dynamic_sidebar( 'stat-widget' ); ?>

If you do it right you’ll see a new sidebar in your widget page in the admin area where you can add the widget you want.

Leave a Comment