• I am looking for a way to add a custom header or widget box with an aweber opt in form (a place where visitors can subscribe with name and email) to the top of my twenty twelve theme right under the navigation menu? Is there are way to do this…

    I want to create something similar to this http://nathalielussier.com/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator keesiemeijer

    (@keesiemeijer)

    Thread Starter andreabolder

    (@andreabolder)

    I am familiar with these. What I need to be able to do is add the code somewhere in the twenty twelve header area. Right now can only add image as a header was wondering is I could somehow integrate an opt in form instead…

    Moderator keesiemeijer

    (@keesiemeijer)

    First create a child theme for the changes we are a making. having access to an unedited version of the theme is vital when dealing with a range of site issues.

    Or download and activate a basic starter child theme for Twenty Twelve here: http://quirm.net/themes/twenty-twelve-child/

    Thread Starter andreabolder

    (@andreabolder)

    I created a child theme. what I want to do is add a widget area underneath the navigation bar where I can add html code for an aweber opt in form

    Moderator keesiemeijer

    (@keesiemeijer)

    Copy header.php into your child theme and change this:

    <nav id="site-navigation" class="main-navigation" role="navigation">
    			<h3 class="menu-toggle"><?php _e( 'Menu', 'twentytwelve' ); ?></h3>
    			<a class="assistive-text" href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentytwelve' ); ?>"><?php _e( 'Skip to content', 'twentytwelve' ); ?></a>
    			<?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?>
    		</nav><!-- #site-navigation -->

    to this:

    <nav id="site-navigation" class="main-navigation" role="navigation">
    			<h3 class="menu-toggle"><?php _e( 'Menu', 'twentytwelve' ); ?></h3>
    			<a class="assistive-text" href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentytwelve' ); ?>"><?php _e( 'Skip to content', 'twentytwelve' ); ?></a>
    			<?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?>
    		</nav><!-- #site-navigation -->
    		<?php if ( ! dynamic_sidebar( 'sidebar-aweber' ) ) : ?>
    		<?php endif; ?>

    And put this in your child theme’s functions.php:

    function child_twentyeleven_widgets_init() {
    	register_sidebar( array(
    			'name' => __( 'Below Navigation', 'twentyeleven' ),
    			'id' => 'sidebar-aweber',
    			'description' => __( 'An optional widget area below the nav menu', 'twentyeleven' ),
    			'before_widget' => '',
    			'after_widget' => "",
    			'before_title' => '',
    			'after_title' => '',
    		) );
    }
    add_action( 'widgets_init', 'child_twentyeleven_widgets_init',11 );

    Thread Starter andreabolder

    (@andreabolder)

    Thank you…I tried this and this written code shows up at the top of my pages

    function child_twentytwelve_widgets_init() { register_sidebar( array( 'name' => __( 'Below Navigation', 'twentytwelve' ), 'id' => 'sidebar-aweber', 'description' => __( 'An optional widget area below the nav menu', 'twentytwelve' ), 'before_widget' => '', 'after_widget' => "", 'before_title' => '', 'after_title' => '', ) ); } add_action( 'widgets_init', 'child_twentytwelve_widgets_init',11 );

    I have no clue what I’m doing wrong here…

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Add An Aweber Opt In Form To Twenty Twelve Header’ is closed to new replies.