• Resolved janbletz

    (@janbletz)


    I realize this has nothing to do with the wonderful Mesocolumn theme, but… It would be really nice to add a widget (or two) next to the header, to make a ‘login’ for members oif my site.

    I’m having a really hard time trying to do this. I have succeeded in making a ‘widget area’, but now I have to get this area next to the header. Any suggestions woul be welcome.

    BTW: maybe this a good idea for the next version of this theme?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author Richie KS

    (@rkcorp)

    something like this will do

    function meso_header_widgets_init() {
       register_sidebar(array(
        'name'=>__('Header', 'mesocolumn'),
        'id' => 'header-widget',
    	'description' => __( 'Widget area on header', 'mesocolumn' ),
    	'before_widget' => '',
    	'after_widget' => '',
    	'before_title' => '',
    	'after_title' => '',
    	));
    }
    add_action( 'widgets_init', 'meso_header_widgets_init', 20 );

    then hook it up with

    function meso_header_widget_box() {
    if ( is_active_sidebar( 'header-widget') ) :
    dynamic_sidebar('header-widget' );
    endif;
    }
    add_action('bp_inside_header','meso_header_widget_box');
    Thread Starter janbletz

    (@janbletz)

    That works, great. Not an easy thing to find out…

    Theme Author Richie KS

    (@rkcorp)

    yeap, the meso theme had lot of hook to customize but it wasn’t obvious enough.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘New widget in header area’ is closed to new replies.