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

WordPress Tips, Code Snippets, and How To Tutorials

  • Home
  • Blog
  • Tips
  • Snippets
  • Tutorials
  • Contact

How to style custom widget areas using CSS

June 11, 2015 by admin Leave a Comment

Sometimes your WordPress theme just doesn’t have enough widget areas and you may need to add some additional custom widget areas to your WordPress theme and then style them using your stylesheet. This WordPress tip will show you how to style your newly added custom widget areas using CSS.

First, you will need to register or add your custom widget areas. If you are using a StudioPress Genesis Framework theme, you can click here to find out How to add more custom widget areas to StudioPress Genesis Framework themes.

After your widget areas have been registered, you can then style those new widget ares in your stylesheet using CSS. You will need the widget_area_id that you used when you registered the widget in your functions.php. For the example below, I am showing you how I styled the part of the Home Top area on the home page of WPSnacks. The id for my Home Top area is home-top. Keeping your widget area simple will come in handy later on.

#home-top {
	background-color: #fff;
	-webkit-border-radius: 7px;
	-moz-border-radius: 7px;
	border-radius: 7px;
	overflow: hidden;
	font-family: 'Cuprum', arial, sans-serif;
	margin: 0 0 15px;
	-moz-box-shadow: 0 0 4px #fff;
	-webkit-box-shadow: 0 0 4px #fff;
	box-shadow: 0 0 4px #fff;
}

#home-top a {
	color: #FF6600;
	font-size: 18px;
	font-weight: normal;
}

#home-top a:hover {
	color: #28b5f0;
}

As you can see above, the first command sets up the Home Top area itself and the next two commands deal with links. This is just an example, there are endless customization possibilities using this method.

If you like this then you should look up more of our WordPress Tips Code Snippets and Tutorials.

Disclosure: There are affiliate links on posts and throughout the website and if you use the links to make a purchase we may earn a commission from it. We link to these companies and their products because of the quality of the companies and not because of the commission we may receive from it.

Disclaimer: The information contained in this website is for general information purposes only and in no event will this website or its owners be liable for any losses or damages associated with your use of our website or content. We recommend that you make a backup of your website before you make updates to it. Click here to see our full Disclaimer.

Filed Under: WordPress Tips Tagged With: CSS, Templates, Widgets

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Hey, We Deliver... Anywhere!

Enter Email Address below to receive our snacks via email:

Join Over 1200 Readers!

Jump To A Random WordPress Tip

Copyright © 2019 • wpsnacks.com