Tagged: ,

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #238890


    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?



    Hi 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.



    Hi 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.



    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.



    Hi 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 id="sidebar">
    	<?php dynamic_sidebar( 'right-sidebar' ); ?>


    <?php if ( is_active_sidebar( 'left-sidebar' ) ) : ?>
    	<ul id="sidebar">
    		<?php dynamic_sidebar( 'left-sidebar' ); ?>
    <?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.



    Ok, I find a way and add this widget to header.

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Add widget to header’ is closed to new replies.