Widget before_title / change h4 to h2

Community Forums Forums Design Tips and Tricks Widget before_title / change h4 to h2

This topic is: not resolved

This topic contains 1 reply, has 2 voices, and was last updated by  braddalton 1 month, 1 week ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #119475

    stephencounsell
    Participant
    Post count: 15

    Hi All,
    I’m having trouble getting the “before_title” working in my widget area. Here’s my code:

    
    genesis_register_sidebar( array(
    	'id'            => 'home-products-heading',
    	'name'          => __( 'Home Products Heading', 'jarlights' ),
    	'description'   => __( 'This is a widget area that contains the heading for Our most loved products', 'jarlights' ),
    ) );
    
    add_action( 'genesis_before_content', 'home_products_heading' );
    function home_products_heading() {
    	if(is_front_page())
    	{
    		genesis_widget_area( 'home-products-heading', array(
    			'before' => '<div class="hph widget-area">',
    			'after' => '</div>',
    			'before_title' => '<h2>',
    			'after_title' => '</h2>'
    		));	
    	}
    }
    

    You’ll see from the code that I want to assign the widget header to H2 rather than the standard H4.

    Although the “before” and “after” allocation works the before_title and after_title do not.

    The development site is here: http://1075925014.1072917475.temp.prositehosting.co.uk/sitedev/

    Any help appreciated
    Thanks
    Steve

    http://1075925014.1072917475.temp.prositehosting.co.uk/sitedev/
    #119706

    braddalton
    Participant
    Post count: 9916

    You can change the size in the CSS. Use Firebug to find the widget class.

    You need to be more specific.

    You want to do this globally or for one specific widget or one specific page?


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

You must be logged in to reply to this topic.