Within Wordpress header.php, I have
<body <?php body_class($class); ?>>
How do check to see if a specific class exists, and then load markup as a result?
For ex.
<body class"home logged-in">
<?php if $class == 'home' ?>
<div class="home"></div>
<? else : ?>
<div class="internal-page"></div>
<? endif; ?>
Thanks!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…