我想做的是根据内容发布的3个主要“父”类别中的哪一个来回显一个类,这是我到目前为止的代码
<article class="post
<?php
if ( in_category( \'dream-it\' )){ echo \'dreamit\'; }
if ( in_category( \'build-it\' )){ echo \'buildit\'; }
if ( in_category( \'get-the-hell-out\' )){ echo \'getout\'; }
?>
">
我知道我做错了,任何帮助都将是惊人的!非常感谢。