I'm trying to style something unique to the Blog/Posts page, which isn't on the front page. The body tag right now looks like this:<body <?php body_class() ?>>
But doing this <body <?php body_class('blog') ?>>
only returns <body class="logged-in">
or just <body>
if I'm not logged in.
I've tried:
<body <?php if ( is_home()) {
echo 'class="blog"';
} else {
body_class(); }?>>
It sort of works but it replaces the "logged-in" class entirely. There has to be a way to append classes to the body tag for posts pages right?
blog
class by default. If it doesn't you might have theme or something else messing up context.