WordPress.org

Forums

register_sidebar ignoring before_widget & after_widget (3 posts)

  1. TrishaM
    Member
    Posted 2 years ago #

    I have the following code in my functions.php file, however when the widget is rendered it is still using the li tag, not a div.

    register_sidebar(array(
    	    'name' => __('Footer Left'),
    	    'id' => 'footersection-left',
    		'class' => 'footersection',
    		'before-widget' => '<div id="%1$s" class="widget %2$s">',
    		'after-widget' => '</div>',
    		'before_title' => '<h3>',
    		'after_title' => '</h3>'
    	));

    WP version is 3.4.2.......any ideas why this is happening?

  2. alchymyth
    Forum Moderator
    Posted 2 years ago #

    how are you calling the footer sidebar?

    dynamic_sidebar(????)

    http://codex.wordpress.org/Function_Reference/dynamic_sidebar

  3. TrishaM
    Member
    Posted 2 years ago #

    HUGE sigh.........I just figured this out......jeeeez.....

    I copied the snippet from someone's blog post about how to make the widgets use DIVs instead of LIs, and I should have looked it over more carefully......I found the mistake in the code about (a hyphen was used where it should be an underscore)......

    Working now.....

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.