0

This is how i registered my sidebar:

register_sidebar(array(
        'name' => 'Post Sidebar',
        'before_widget' => '<div class="widgetdiv"><div id="%1$s" class="widget %2$s">',
        'after_widget' => '</div></div>',
        'before_title' => '<div class="titlediv">',
        'after_title' => '</div>',
    ));

The problem I have:

Title div wrapped inside widgetdiv. The above code output like this.

<div class="widgetdiv">
<div class="titlediv">My title
</div>
</div>

My requirement:

<div class="titlediv">My title
</div>
<div class="widgetdiv">
</div>

I mean titlediv should be outside widgetdiv

Can anyone give me good solution?. Thanks

1 Answer 1

1
register_sidebar(array(
        'name' => 'Post Sidebar',
        'before_widget' => '<div id="%1$s" class="widget %2$s">',
        'after_widget' => '</div></div>',
        'before_title' => '<div class="titlediv">',
        'after_title' => '</div><div class="widgetdiv">',
    ));

You will have a wrapper div, then your title div and then your widgetdiv.

1
  • Trust me dude. You are awesomeeeee.... Thankyou very much. Commented Dec 27, 2011 at 1:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.