Canvas: Wrap widget H3 tag in div
-
I would like to style the widget header with a solid background and downwards arrow. I have the css but need ot wrap the H3 tag in a <div class=arrow>.
I have tried using the register_sidebar to do this but it is not working. Here is what I have:
remove_action( 'init', 'the_widgets_init' ); function the_widgets_init2() { // Widgetized sidebars register_sidebar(array('name' => 'Primary', 'woothemes','id' => 'primary','description' => "Normal full width Sidebar", 'before_widget' => '<div id="%1$s" class="widget %2$s">','after_widget' => '</div>','before_title' => '<div class="arrow_box"><h3 class="widget-title">', 'after_title' => '</h3></div>')); register_sidebar(array('name' => 'Secondary','id' => 'secondary', 'description' => "Secondary sidebar for use in three column layout", 'before_widget' => '<div id="%1$s" class="widget %2$s">','after_widget' => '</div>','before_title' => '<h3 class="rounded>','after_title' => '</h3>')); $total = get_option( 'woo_footer_sidebars', 4 ); if ( ! $total ) $total = 4; for ( $i = 1; $i <= intval( $total ); $i++ ) { register_sidebar( array( 'name' => sprintf( __( 'Footer %d', 'woothemes' ), $i ), 'id' => sprintf( 'footer-%d', $i ), 'description' => sprintf( __( 'Widgetized Footer Region %d.', 'woothemes' ), $i ), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<div class="arrow_box"><h3 class="widget-title">', 'after_title' => '</h3></div>' ) ); } // Footer widgetized area register_sidebar(array('name' => 'Footer 1','id' => 'footer-1', 'description' => "Widetized footer", 'before_widget' => '<div id="%1$s" class="widget %2$s">','after_widget' => '</div>','before_title' => '<div class="arrow_box"><h3 class="widget-title">', 'after_title' => '</h3></div>')); register_sidebar(array('name' => 'Footer 2','id' => 'footer-2', 'description' => "Widetized footer", 'before_widget' => '<div id="%1$s" class="widget %2$s">','after_widget' => '</div>','before_title' => '<div class="arrow_box"><h3 class="widget-title">', 'after_title' => '</h3></div>')); register_sidebar(array('name' => 'Footer 3','id' => 'footer-3', 'description' => "Widetized footer", 'before_widget' => '<div id="%1$s" class="widget %2$s">','after_widget' => '</div>','before_title' => '<h3>','after_title' => '</h3>')); register_sidebar(array('name' => 'Footer 4','id' => 'footer-4', 'description' => "Widetized footer", 'before_widget' => '<div id="%1$s" class="widget %2$s">','after_widget' => '</div>','before_title' => '<h3>','after_title' => '</h3>')); } add_action( 'init', 'the_widgets_init2' );
Can anyone offer any advice as to where Ive gone wrong please?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Canvas: Wrap widget H3 tag in div’ is closed to new replies.