-
AuthorPosts
-
March 17, 2014 at 6:12 pm #238890
Hi
I’d like to add widget area in header. I know that I need to add some code in function.php.
Can you, please, write it down?Thanks
March 18, 2014 at 5:36 am #239140Hi Tecrane!
Please refer to this link: http://codex.wordpress.org/Function_Reference/dynamic_sidebar
Basically, what you need is to register a widget area using the register_sidebar function then render that widget area on the header using the dynamic_sidebar function. You can add the code on includes > helper-main-menu.php. For further customization, please visit Werkpress.
Cheers!
IsmaelMarch 18, 2014 at 8:26 am #239198Hi Ismael, can you please let us know exactly where to add the code in helper-main-menu.php. I am trying to add a new widget area to the right side of the header. I would like to add a tagline there.
Thank you.
March 18, 2014 at 8:56 am #239213Hey!
Exact steps for it are beyond what we can do via support but if its a must have customization you can follow Ismael’s link above for Werkpress or try Codeable or Microlancer.
Regards,
DevinMarch 18, 2014 at 12:08 pm #239304Hi again
As I understand, from http://codex.wordpress.org/Function_Reference/dynamic_sidebar
I need to add in helper-main-menu.php those types of code<ul id="sidebar"> <?php if ( ! dynamic_sidebar() ) : ?> <li>{static sidebar item 1}</li> <li>{static sidebar item 2}</li> <?php endif; ?> </ul>or
<ul id="sidebar"> <?php dynamic_sidebar( 'right-sidebar' ); ?> </ul>or
<?php if ( is_active_sidebar( 'left-sidebar' ) ) : ?> <ul id="sidebar"> <?php dynamic_sidebar( 'left-sidebar' ); ?> </ul> <?php endif; ?>Did I understand right or not?
I don’t see any results from it.
Please, give me instruction step-by-step, I didn’t learn php.Thanks
March 18, 2014 at 1:40 pm #239324Ok, I find a way and add this widget to header.
-
AuthorPosts
- The topic ‘Add widget to header’ is closed to new replies.
