badget

Biggest Sale! Special Offer!

Get 30% discount on all of our single themes with this coupon code: #30%SALE

Hurry up! *Limited time offer*

Reply To: add new dynamic sidebar and sidebar template for individual pages to use widgets

#44594
ilayxz
Participant

Hello,

I have a similar problem;

First all, thank you for hint above. I’ve already created a widget area. To this I have used the functions.php for my child theme:

register_sidebar( array(
	'name' 				=> __( 'Unsere Lesitungen Sidebar', 'interface' ),
	'id' 					=> 'unsere_leistungen_sidebar',
	'description'   	=> __( 'Shows widgets at Right side for Unsere Leistungen.', 'interface' ),
	'before_widget' 	=> '<aside id="%1$s" class="widget %2$s">',
	'after_widget'  	=> '</aside>',
	'before_title'  	=> '<h2 class="widget-title">',
	'after_title'   	=> '</h2>'
) );

This works. I see my new area in Dashboard/Design/Widgets on the right side. It name’s “Unsere Lesitungen Sidebar”.

My problem is the following:
To register a dynamic sidebar for may widget in this child theme functions.php, I have the following code:

if ( is_active_sidebar( 'unsere_leistungen_sidebar' ) ) :
    dynamic_sidebar( 'unsere_leistungen_sidebar' );
endif;

But it doesn’t work. I’d like to have in my right-sidebar. If I add this code-snippel in the sidebar-extentions-php for Theme interface inside the function interface_display_right_sidebar(), it works. But it must work for my child-theme.

Can you help me please? Where do I make mistake?

Thank you in advance