Support » Theme: MesoColumn » Adding a header widget area

  • Resolved DavisGouveia

    (@davisgouveia)


    Hi!

    I want to add a header widget area to this theme and i having some problems.

    I already added some code in functions.php but don’t know where is the right place to put the rest of the code of the post i’m following in header.php

    I want that the header to be composed by half image aligh to the left and this new widget area in half header aligh to the right.

    Can you help me with this?

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter DavisGouveia

    (@davisgouveia)

    With some hours serching the code already fixed this! 😉

    Try to post the solution it will help others

    I need the same functionality (widget area in header).
    Can you please help

    Theme Author Richie KS

    (@rkcorp)

    well the theme did not have header widget but if you really need one, try use this method.

    *must use latest version

    1. create meso-custom-functions.php in your site/wp-content/
    2. copy paste this code into it

    <?php
    function dez_add_new_widgets_init() {
    register_sidebar(array(
        'name'=>__('Header', TEMPLATE_DOMAIN),
        'id' => 'header',
    	'description' => __( 'Header widget area', TEMPLATE_DOMAIN ),
    	'before_widget' => '<div id="%1$s" class="widget %2$s">',
    	'after_widget' => '</div>',
    	'before_title' => '',
    	'after_title' => '',
    	));
    }
    add_action( 'widgets_init', 'dez_add_new_widgets_init' );
    
    function dez_add_header_widget() {
    if ( is_active_sidebar( 'header' ) ) :
    dynamic_sidebar( 'header' );
    endif;
    }
    add_action('bp_after_header','dez_add_header_widget');
    ?>

    formatting and css might need adjustment..

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Adding a header widget area’ is closed to new replies.