SlideShare a Scribd company logo
1 of 36
Download to read offline
So I’m working on this ball again.
It’s still running on an old Genesis child theme, and I’m tired of falling all over the div IDs.
Time to port to HTML5 and spruce up a few things.
Now, let’s take a look at something.
If you were here last year, you know this joke. But what’s the difference between that ball - and this basic widgeted home page?
1
2 3 4
Not one thing, from a widget standpoint. That was last year’s punchline.
If you want to get technical, yes - the Clinix page has a header, and Frontenac - the ball - doesn’t.
The other thing they have in common is the reason we’ve gathered here today:
Home pages almost always have the home body class defined right here.
Here’s our big damn ball … this from last year’s version of the live site.
Here’s a content page.
The pros page has the pros body class.
Here’s a widgeted front page …
Here’s a content page.
Now, how many times have you built a home page and NOT, almost without thinking, defined its styles like this: .home row, .home .entry-footer, home this,
home that.
You couldn’t do that if the home body class wasn’t already baked into your theme.
Which it is, in almost every theme. Or a reasonable facsimile. Here’s Agency Pro, a Genesis child theme with HTML5.
Ever wonder how Genesis themes and others pull off their color variations? Here’s Agency Pro again.
And whattya do when a client has two completely different audiences to attract? Like my friend Naz here. Day business: commercial real estate.
Other times, he’s Coach Naz on the tennis court. One site, two topics two audiences.
Two body classes.
What if the Pros’ area …
needs to look different …
… from the programs area? Now we have three body classes!
Now, we’re not limited to any certain words in that long-butt body-class rule. We can use any of ‘em.
Now, we’re not limited to any certain words in that long-butt body-class rule. We can use any of ‘em.
Now, we’re not limited to any certain words in that long-butt body-class rule. We can use any of ‘em. Or if we don’t like those, we can make our own.
Here's a category archive from a hypothetical food blog - say, soups and stews.
We all know what a category archive is? Good
Maybe we want the dessert archive to have different colors.
In Genesis this is easy! We just add the body class - dessert - to the bottom of the post in the admin.
Then write new rules that all start with .dessert ...
Here’s one that also works in Genesis but doesn’t need it
I grabbed it from Philip Newcomer, the @BackwoodsCoder, who looks to have some nifty-looking plugins. Now, his version checks for single posts, but I like
the idea of adding a body class to the archive or anything else that might be in that category. And, this adds all the categories to the appropriate body-class
tags. So no picking and choosing - just style ‘em ;like you find ‘em.
So that foreach function assigns the category slug here …
See - there it is - it adds the slug …
and here!
Here it is, in the markup! PS> the function picks up the slug, so if you want this thing short, you can make it short. No reason to have to type something that
looks like your kitten wrote it in the middle of the night.
Heh. Maybe writing a function once is way better than writing 'desserts' on fifteen posts!
So with one function and as much or as little CSS as you feel like, you can go from salty chicken soup …
to sugary, chocolatey cupcakes …
To a buttoned-up business persona …
… To a fun-loving tennis coach and so much more.
Moi
Mary Baum
@marybaum

More Related Content

Similar to Target anything wilth body classes!

Widget areas
Widget areasWidget areas
Widget areasWordCamp
 
Programming methodology lecture11
Programming methodology lecture11Programming methodology lecture11
Programming methodology lecture11NYversity
 
Visual rhetoric, April 22, 2013
Visual rhetoric, April 22, 2013Visual rhetoric, April 22, 2013
Visual rhetoric, April 22, 2013Miami University
 
Intro to Drupal Slides - DrupalCampSC 2014
Intro to Drupal Slides - DrupalCampSC 2014Intro to Drupal Slides - DrupalCampSC 2014
Intro to Drupal Slides - DrupalCampSC 2014Sarah Shealy
 
SW Drupal Summit - Upgrading 6 to 7
SW Drupal Summit - Upgrading 6 to 7SW Drupal Summit - Upgrading 6 to 7
SW Drupal Summit - Upgrading 6 to 7Amye Scavarda
 
Keeping Eloquent Eloquent
Keeping Eloquent EloquentKeeping Eloquent Eloquent
Keeping Eloquent EloquentColin DeCarlo
 
WRA 210 April 14th PowerPoint
WRA 210 April 14th PowerPointWRA 210 April 14th PowerPoint
WRA 210 April 14th PowerPointMiami University
 
A Beginner's Guide to Popping the Bonnet and Getting Your Hands Dirty
A Beginner's Guide to Popping the Bonnet and Getting Your Hands DirtyA Beginner's Guide to Popping the Bonnet and Getting Your Hands Dirty
A Beginner's Guide to Popping the Bonnet and Getting Your Hands DirtyKenneth Scott Huntley
 
Visual Rhetoric, Feb 11, 2013
Visual Rhetoric, Feb 11, 2013Visual Rhetoric, Feb 11, 2013
Visual Rhetoric, Feb 11, 2013Miami University
 
Lesson 4 Adding Navigator and PagesAdding Links Transcript- .docx
Lesson 4 Adding Navigator and PagesAdding Links Transcript- .docxLesson 4 Adding Navigator and PagesAdding Links Transcript- .docx
Lesson 4 Adding Navigator and PagesAdding Links Transcript- .docxSHIVA101531
 
Programming methodology lecture08
Programming methodology lecture08Programming methodology lecture08
Programming methodology lecture08NYversity
 
La build your own website september 5
La build your own website september 5La build your own website september 5
La build your own website september 5Thinkful
 
D:\Documents And Settings\Jamel King\Desktop\Washrinserepeat1
D:\Documents And Settings\Jamel King\Desktop\Washrinserepeat1D:\Documents And Settings\Jamel King\Desktop\Washrinserepeat1
D:\Documents And Settings\Jamel King\Desktop\Washrinserepeat1guestc11121
 
The Ultimate Guide to Scrapebox - The Only Scrapebox Tutorial You Need
The Ultimate Guide to Scrapebox - The Only Scrapebox Tutorial You NeedThe Ultimate Guide to Scrapebox - The Only Scrapebox Tutorial You Need
The Ultimate Guide to Scrapebox - The Only Scrapebox Tutorial You Needfrankmo920
 
Wait what? How to Enhance your Responsive Process with Content Questions
Wait what? How to Enhance your Responsive Process with Content QuestionsWait what? How to Enhance your Responsive Process with Content Questions
Wait what? How to Enhance your Responsive Process with Content QuestionsEileen Webb
 
Monday Night, Feb 10th Visrhet
Monday Night, Feb 10th VisrhetMonday Night, Feb 10th Visrhet
Monday Night, Feb 10th VisrhetMiami University
 
On Selecting JavaScript Frameworks (Women Who Code 10/15)
On Selecting JavaScript Frameworks (Women Who Code 10/15)On Selecting JavaScript Frameworks (Women Who Code 10/15)
On Selecting JavaScript Frameworks (Women Who Code 10/15)Zoe Landon
 

Similar to Target anything wilth body classes! (20)

Widget areas
Widget areasWidget areas
Widget areas
 
Programming methodology lecture11
Programming methodology lecture11Programming methodology lecture11
Programming methodology lecture11
 
Visual rhetoric, April 22, 2013
Visual rhetoric, April 22, 2013Visual rhetoric, April 22, 2013
Visual rhetoric, April 22, 2013
 
Tensorflow go
Tensorflow goTensorflow go
Tensorflow go
 
Scalding at Etsy
Scalding at EtsyScalding at Etsy
Scalding at Etsy
 
Intro to Drupal Slides - DrupalCampSC 2014
Intro to Drupal Slides - DrupalCampSC 2014Intro to Drupal Slides - DrupalCampSC 2014
Intro to Drupal Slides - DrupalCampSC 2014
 
SW Drupal Summit - Upgrading 6 to 7
SW Drupal Summit - Upgrading 6 to 7SW Drupal Summit - Upgrading 6 to 7
SW Drupal Summit - Upgrading 6 to 7
 
Keeping Eloquent Eloquent
Keeping Eloquent EloquentKeeping Eloquent Eloquent
Keeping Eloquent Eloquent
 
WRA 210 April 14th PowerPoint
WRA 210 April 14th PowerPointWRA 210 April 14th PowerPoint
WRA 210 April 14th PowerPoint
 
A Beginner's Guide to Popping the Bonnet and Getting Your Hands Dirty
A Beginner's Guide to Popping the Bonnet and Getting Your Hands DirtyA Beginner's Guide to Popping the Bonnet and Getting Your Hands Dirty
A Beginner's Guide to Popping the Bonnet and Getting Your Hands Dirty
 
Visual Rhetoric, Feb 11, 2013
Visual Rhetoric, Feb 11, 2013Visual Rhetoric, Feb 11, 2013
Visual Rhetoric, Feb 11, 2013
 
Lesson 4 Adding Navigator and PagesAdding Links Transcript- .docx
Lesson 4 Adding Navigator and PagesAdding Links Transcript- .docxLesson 4 Adding Navigator and PagesAdding Links Transcript- .docx
Lesson 4 Adding Navigator and PagesAdding Links Transcript- .docx
 
Programming methodology lecture08
Programming methodology lecture08Programming methodology lecture08
Programming methodology lecture08
 
La build your own website september 5
La build your own website september 5La build your own website september 5
La build your own website september 5
 
7. recap and q&a
7. recap and q&a7. recap and q&a
7. recap and q&a
 
D:\Documents And Settings\Jamel King\Desktop\Washrinserepeat1
D:\Documents And Settings\Jamel King\Desktop\Washrinserepeat1D:\Documents And Settings\Jamel King\Desktop\Washrinserepeat1
D:\Documents And Settings\Jamel King\Desktop\Washrinserepeat1
 
The Ultimate Guide to Scrapebox - The Only Scrapebox Tutorial You Need
The Ultimate Guide to Scrapebox - The Only Scrapebox Tutorial You NeedThe Ultimate Guide to Scrapebox - The Only Scrapebox Tutorial You Need
The Ultimate Guide to Scrapebox - The Only Scrapebox Tutorial You Need
 
Wait what? How to Enhance your Responsive Process with Content Questions
Wait what? How to Enhance your Responsive Process with Content QuestionsWait what? How to Enhance your Responsive Process with Content Questions
Wait what? How to Enhance your Responsive Process with Content Questions
 
Monday Night, Feb 10th Visrhet
Monday Night, Feb 10th VisrhetMonday Night, Feb 10th Visrhet
Monday Night, Feb 10th Visrhet
 
On Selecting JavaScript Frameworks (Women Who Code 10/15)
On Selecting JavaScript Frameworks (Women Who Code 10/15)On Selecting JavaScript Frameworks (Women Who Code 10/15)
On Selecting JavaScript Frameworks (Women Who Code 10/15)
 

More from WordCamp

Momma's CSS-Grid
Momma's CSS-GridMomma's CSS-Grid
Momma's CSS-GridWordCamp
 
Structure style-story
Structure style-storyStructure style-story
Structure style-storyWordCamp
 
New rules for responsive design
New rules for responsive designNew rules for responsive design
New rules for responsive designWordCamp
 
Designing for conversion
Designing for conversionDesigning for conversion
Designing for conversionWordCamp
 
Design in WordPress: Three files, unlimited layouts #wcstl
Design in WordPress: Three files, unlimited layouts #wcstlDesign in WordPress: Three files, unlimited layouts #wcstl
Design in WordPress: Three files, unlimited layouts #wcstlWordCamp
 
Three files, unlimited layouts: The designer's guide to WordPress freedom. #w...
Three files, unlimited layouts: The designer's guide to WordPress freedom. #w...Three files, unlimited layouts: The designer's guide to WordPress freedom. #w...
Three files, unlimited layouts: The designer's guide to WordPress freedom. #w...WordCamp
 

More from WordCamp (6)

Momma's CSS-Grid
Momma's CSS-GridMomma's CSS-Grid
Momma's CSS-Grid
 
Structure style-story
Structure style-storyStructure style-story
Structure style-story
 
New rules for responsive design
New rules for responsive designNew rules for responsive design
New rules for responsive design
 
Designing for conversion
Designing for conversionDesigning for conversion
Designing for conversion
 
Design in WordPress: Three files, unlimited layouts #wcstl
Design in WordPress: Three files, unlimited layouts #wcstlDesign in WordPress: Three files, unlimited layouts #wcstl
Design in WordPress: Three files, unlimited layouts #wcstl
 
Three files, unlimited layouts: The designer's guide to WordPress freedom. #w...
Three files, unlimited layouts: The designer's guide to WordPress freedom. #w...Three files, unlimited layouts: The designer's guide to WordPress freedom. #w...
Three files, unlimited layouts: The designer's guide to WordPress freedom. #w...
 

Recently uploaded

Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...BookNet Canada
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...Karmanjay Verma
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Nikki Chapple
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxAna-Maria Mihalceanu
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...itnewsafrica
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 

Recently uploaded (20)

Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 

Target anything wilth body classes!

  • 1. So I’m working on this ball again. It’s still running on an old Genesis child theme, and I’m tired of falling all over the div IDs. Time to port to HTML5 and spruce up a few things. Now, let’s take a look at something.
  • 2. If you were here last year, you know this joke. But what’s the difference between that ball - and this basic widgeted home page?
  • 3. 1 2 3 4 Not one thing, from a widget standpoint. That was last year’s punchline. If you want to get technical, yes - the Clinix page has a header, and Frontenac - the ball - doesn’t. The other thing they have in common is the reason we’ve gathered here today:
  • 4. Home pages almost always have the home body class defined right here.
  • 5. Here’s our big damn ball … this from last year’s version of the live site.
  • 7. The pros page has the pros body class.
  • 8. Here’s a widgeted front page …
  • 10. Now, how many times have you built a home page and NOT, almost without thinking, defined its styles like this: .home row, .home .entry-footer, home this, home that. You couldn’t do that if the home body class wasn’t already baked into your theme.
  • 11. Which it is, in almost every theme. Or a reasonable facsimile. Here’s Agency Pro, a Genesis child theme with HTML5.
  • 12. Ever wonder how Genesis themes and others pull off their color variations? Here’s Agency Pro again.
  • 13. And whattya do when a client has two completely different audiences to attract? Like my friend Naz here. Day business: commercial real estate.
  • 14. Other times, he’s Coach Naz on the tennis court. One site, two topics two audiences. Two body classes.
  • 15. What if the Pros’ area …
  • 16. needs to look different …
  • 17. … from the programs area? Now we have three body classes!
  • 18. Now, we’re not limited to any certain words in that long-butt body-class rule. We can use any of ‘em.
  • 19. Now, we’re not limited to any certain words in that long-butt body-class rule. We can use any of ‘em.
  • 20. Now, we’re not limited to any certain words in that long-butt body-class rule. We can use any of ‘em. Or if we don’t like those, we can make our own.
  • 21. Here's a category archive from a hypothetical food blog - say, soups and stews. We all know what a category archive is? Good
  • 22. Maybe we want the dessert archive to have different colors.
  • 23. In Genesis this is easy! We just add the body class - dessert - to the bottom of the post in the admin.
  • 24.
  • 25.
  • 26. Then write new rules that all start with .dessert ...
  • 27. Here’s one that also works in Genesis but doesn’t need it I grabbed it from Philip Newcomer, the @BackwoodsCoder, who looks to have some nifty-looking plugins. Now, his version checks for single posts, but I like the idea of adding a body class to the archive or anything else that might be in that category. And, this adds all the categories to the appropriate body-class tags. So no picking and choosing - just style ‘em ;like you find ‘em.
  • 28. So that foreach function assigns the category slug here …
  • 29. See - there it is - it adds the slug …
  • 31. Here it is, in the markup! PS> the function picks up the slug, so if you want this thing short, you can make it short. No reason to have to type something that looks like your kitten wrote it in the middle of the night. Heh. Maybe writing a function once is way better than writing 'desserts' on fifteen posts!
  • 32. So with one function and as much or as little CSS as you feel like, you can go from salty chicken soup …
  • 33. to sugary, chocolatey cupcakes …
  • 34. To a buttoned-up business persona …
  • 35. … To a fun-loving tennis coach and so much more.