How To Wrap Widget Areas in a Div Class

This tutorial provides the code which enables you to display widgets in columns and wrap them in a containing div class like this:

wrap-widgets

This way you can style the container containing all widgets.

Tested on the Genesis Sample child theme by StudioPress.

You can use this solution for any templates which contain widgets displayed inline, columns or any other use of multiple widgets you need to wrap in a custom div class.

Here’s the PHP & CSS code you simply wrap your widgets with:

Was This Tutorial Helpful?

Free

$0

Access only to all free tutorials per month.



Monthly

$75

Access to 10 premium tutorials per month.


Tutorial Request


Includes code guarantee and coding support.

Yearly

$500

Access to 15 premium tutorials per month.


Monthly Tutorial Request


Includes code guarantee and priority coding support.