• Feed
  • About The Blog

    The Blogosaurus is a company technology blog from Louisville Web Development firm MIB Solutions. The issues on or blog range from our personal use of Wordpress, Joomla, PHP and Database programming, AJAX, Flash, and other web development languages and tools we use on our client's projects.

    The Blogosaurus was born in 2008, and continues to be a resources for Internet professionals and Google searches alike.

  • Categories

  • Archives

  • Recent Posts

  • Our Analytics


    9,193
    Unique
    Visitors
    Powered By Google Analytics
  • Look Around

  • Recent Posts

  • Categories

  • « Continued List of Why I Hate ‘XCode’ for Mac | Home | Assigning Roles in Wordpress »

    Custom Styling Wordpress Widgets

    September 29, 2009

    I love Wordpress because I learn more about PHP and how it works with every requirement that comes my way. One issue is with a Wordpress theme that has multiple widgets, and you want each section of widgets to be styled differently. Let’s say you have two sections of widgets on your website:

    1. Sidebar (the basic sidebar widget section that most everyone has) and
    2. A footer (this could be widgets in the footer, or somewhere else on the site that is calling dynamic widgets via the Dashboard).

    So of course we want both to have different styles, such as background color, padding, link colors, etc.

    You will need to review your theme’s function files, an example of one I wrote custom (so it may be different than yours) is below. I had to take an image of it because it’s not being inserted correctly within my WP theme:
    Picture 16

    Notice the line that proclaims a beginning and ending div with the class,

    Picture 17

    I have essentially given the widgets in this sidebar a special class which is called in the css. We can then add a css declaration as below,

    Comments