• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2662

Original Genesis Tutorials & 5000+ Guaranteed Code

Snippets

  • Support
  • Newsletter
  • Videos
  • Log in

Premium Member? - Request custom code

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:

Register for full access

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

PHP Code

template_include

get_body_class

if else

array

class_exists

foreach

sprintf

add_action

printf

variable

Advertise · WPEngine · Genesis · Log in

  • How Premium Membership Works
  • Sign Up
  • Support
  • Subscription Details/Invoice
  • Tagged Tutorials
  • Access-Download Problems