Viewing 6 replies - 1 through 6 (of 6 total)
  • You would need to add another widget-capable area to your child theme’s theme’s header.php template file. Have a look at widgetizing themes.

    Thread Starter iselaespana

    (@iselaespana)

    Ok so it says to :

    copy the existing markup from sidebar.php into a new widget in functions.php

    How do I create a NEW widget function?

    You register a new widget in your child’s functions.php file.

    function my_header_widget() {
    	register_sidebar( array(
    		'name' => __( 'Header', 'twentyeleven' ),
    		'id' => 'header',
    		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    		'after_widget' => "</aside>",
    		'before_title' => '<h3 class="widget-title">',
    		'after_title' => '</h3>',
    	) );
    }
    add_action( 'widgets_init', 'my_header_widget' );
    Thread Starter iselaespana

    (@iselaespana)

    I added that… but now I’m a little lost to what comes next. It does not appear in my admin widget area.

    Thread Starter iselaespana

    (@iselaespana)

    Ok It appears in the admin area now how would I target it in Css to appear in my DIV??

    Thread Starter iselaespana

    (@iselaespana)

    OK I was able to fix it. Thank you!!!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Adding search box above header in div?’ is closed to new replies.