Jump to content
Sign in to follow this  

Adding a New Widget Area

Recommended Posts

tunatraffic+    0

Here is a fun one... Hi All! I need to add a widget area to the header of this site: http://campshutout.com/ Right now I am cheating and injecting this code snippet into the header.php file of my child theme: "

Register Now
" In a ideal world I need a widget area for the client to change. But when I add a new widget area it does something weird and removes all my widgets from the main sidebar (I believe this is due to the child theme functions.php loading first) This is going in my child's header.php: "
<?php if ( is_active_sidebar( 'header_register' )) { dynamic_sidebar( 'header_register' ); } ?>
" This is going in the child's functions.php: register_sidebar( array( 'name' => __( 'header register', 'child' ), 'id' => 'header_register', 'description' => __( 'register logo goes here', 'child' ), 'before_widget' => '', 'after_widget' => '', 'before_title' => '
', 'after_title' => '
', ) ); Any thoughts how I can load the parent theme's sidebars first without deactivating the sidebars and then adding them back by via the child theme. I saw several areas where sidebars and widgets are loading in the parent but I dont want to miss any. This is a fun one.... :) Mike

Share this post

Link to post
Share on other sites
Danny    1,327
Hi Mike, I'm afraid this goes beyond my knowledge or skill level, I hope your OK with waiting a while longer for another PageLines mod or user who may be able to assist you.

Please search our forums, before posting!

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this