Support » Theme: Cenote » How to add a widget area below header?

  • Resolved greyrocket

    (@greyrocket)


    Hi
    I am using a child theme of Cenote.
    Is it possible to somehow add a new widget area just below the header and post slider, in a way that is retained should the parent theme be updated?

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi,

    For a new widget area below the header, you can go to the ‘function.php’ in the child theme and insert the widget area code as shown below:

    function header_widgets_init() {
    
    register_sidebar( array(
    
        'name' => 'Below Header Sidebar',
    
        'id' => 'header-sidebar1',
    
        'before_widget' => '<aside class="widget %2$s">',
    
        'after_widget' => '</aside>',
    
        'before_title' => '<h2 class="widget-title">',
    
        'after_title' => '</h2>',
    
    ) );
    
    }
    
    add_action( 'widgets_init', 'header_widgets_init' );
    
    function below_header_sidebar(){
    	
    	if ( is_active_sidebar( "header-sidebar1" )) {
    	dynamic_sidebar( "header-sidebar1" );
    	}
    }
    add_action( 'cenote_after_header', 'below_header_sidebar' );

    Thanks.

    Thanks Rajesh. Appreciate the reply and it is all working well.

    Hi,

    Glad to know it worked. Feel free to ask again if you get any issue regarding the theme. If you liked this theme, you can help us by leaving a review.

    Thanks.

    Thanks Rajesh. I do have an issue with Google Maps that I have posted here. If you get a chance any help would be appreciated.

    Hi,

    It seems you are using a plugin for the google map, so could you ask in the plugin support forum as they might be able to provide you with a better solution?

    Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.