Understanding the body_class() function
-
I need help! I am trying to figure out where the “body_class()” function gets its list of classes. I’m using it on one of the sites I manage. It returns a list of classes but one of the classes in the list should not be there; it completely botches-up the entire page (it seems to be an unrecognized class). In other words, if the call to “body_class()” returns a body tag that looks like this:
<body class=”archive category category-games category-events”>
…and the “category” class should not be present, how do I find out why the “category” class is in the list?
(note: I know this can be “fixed” by removing the class with “add_filter()” -and I’ve done that temporarily- but I’d like to understand why body_class() is returning an incorrect class in the list.)
- The topic ‘Understanding the body_class() function’ is closed to new replies.