Skip to content

Brian Krogsgard

is Constantly Curious

  • Get in touch
  • About me

Tag: body_class

Add a body class based on the value of a custom field / post meta

Posted on June 20, 2012March 24, 2015 by Brian Krogsgard

This morning I needed to add a body class to a page only if a meta value stored in the posts meta data was a certain value. Here are a couple examples of that in action.

Howdy :)

My name is Brian. I'm a web developer in Birmingham, Alabama. I love building websites, and I build them with WordPress. I blog about the web and WordPress around here. I tweet too. Have something to share with me? Get in touch!
© Brian Krogsgard, 2016 | Made with WordPress