PhotoDune

Help counting number of widgets and adding custom class with php in wordpress?

100 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 2-3 years
  • Referred between 1 and 9 users
  • United Kingdom
ZefWebDesign says

Posted this in off topic a while back and got no replies, thought I might have better luck here ;P

I would like to give the user the ability to change the configuration of widgets on pages through the admin panel giving them a number of styles. I understand how I would do this with html and css. I would assign each widget a custom class name like class=”frontpage-widget-1” class=”frontpage-widget-2” etc so the each could be styled differently. My question is how to I achieve this with php?

Can it be done when the sidebar is registered in functions.php or when it is called in the theme? Sorry if im confusing you!

Thanks in advance any advice will be greatly appreciated!

by
by
by
by
by