StudioPress Community Forums
  StudioPress Community Forums > Forums > General Discussion
For help and support, access to your downloads, or to manage your account please log into My StudioPress.

These forums have been set to read-only so you can browse the existing topics for any questions you may have.

For general discussion on WordPress, CSS and design (NOT for support) visit the new Community Forums.
 
 
Thread Tools Display Modes
  #1  
Old 10-03-2012, 09:28 AM
katootje katootje is offline
Registered User
Genesis Member
Pro Plus Member
 
Join Date: Sep 2010
Posts: 8
Default layout settings/body class on category

Hi, I need to style a website with different colors on different pages. For posts and pages I use the options at layout settings to make bodyclass for the color. It works perfect.
Now I need the same for category-pages. But there I can only choose a layout at the layoutsettings. No option the create a bodyclass for a specific category at the backend of WordPress. Now I can combine a category and a bodyclass in functions.php but that is not really user friendly. Why is there no way to add a bodyclass at layout settings at the categories and is there a way to add this box?
  #2  
Old 10-03-2012, 10:40 AM
andrea_r's Avatar
andrea_r andrea_r is offline
Forum Manager
 
Join Date: Nov 2009
Location: Eastern Canada
Posts: 36,279
Default

WordpRess already adds category-specific body classes.

View the html source of the page and look at the classes added to the body tag.
__________________
*****
These forums were CLOSED to new posts on November 19th, 2012. New forums are here: http://www.studiopress.com/forums/ and you will need to SIGN UP AGAIN.

If you need assitance with setting up your theme, go to http://my.studiopress.com/ and read the SETUP links or the TUTORIALS link on the side tab.

If you need Account Assistance, file a help desk ticket at the same location.
  #3  
Old 10-03-2012, 11:39 AM
katootje katootje is offline
Registered User
Genesis Member
Pro Plus Member
 
Join Date: Sep 2010
Posts: 8
Default

I don't need category specific body classes. I need to add a custom body class to a category. For example. The site I need this for has webpages with pink, green, orange or blue text. So I added for the pages the bodyclasses pink, green, orange or blue and defined the css for this bodyclasses. I need to do the same for the category pages
  #4  
Old 10-03-2012, 11:49 AM
andrea_r's Avatar
andrea_r andrea_r is offline
Forum Manager
 
Join Date: Nov 2009
Location: Eastern Canada
Posts: 36,279
Default

What I'm saying is to use the category body classes. Add them to your predefined classes.
__________________
*****
These forums were CLOSED to new posts on November 19th, 2012. New forums are here: http://www.studiopress.com/forums/ and you will need to SIGN UP AGAIN.

If you need assitance with setting up your theme, go to http://my.studiopress.com/ and read the SETUP links or the TUTORIALS link on the side tab.

If you need Account Assistance, file a help desk ticket at the same location.
  #5  
Old 10-03-2012, 03:31 PM
katootje katootje is offline
Registered User
Genesis Member
Pro Plus Member
 
Join Date: Sep 2010
Posts: 8
Default

Then everytime a category is added they need me to add the category class to the style.css. That is not what I want. WIth the custom body class of the layoutsettings it's going automatically, without my interverance. Like I do on the pages and the other post types. I want something like that on the categories. So I have the color as the bodyclass.
  #6  
Old 10-03-2012, 04:58 PM
andrea_r's Avatar
andrea_r andrea_r is offline
Forum Manager
 
Join Date: Nov 2009
Location: Eastern Canada
Posts: 36,279
Default

There isn't anything...

But you can just use "category" as a body class. That will apply to all categories even when they make new ones.
__________________
*****
These forums were CLOSED to new posts on November 19th, 2012. New forums are here: http://www.studiopress.com/forums/ and you will need to SIGN UP AGAIN.

If you need assitance with setting up your theme, go to http://my.studiopress.com/ and read the SETUP links or the TUTORIALS link on the side tab.

If you need Account Assistance, file a help desk ticket at the same location.
 

Tags
body class, category, layout settings

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 08:26 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.