Support » Fixing WordPress » I don’t want Children to show-up

Viewing 2 replies - 1 through 2 (of 2 total)
  • No reply from anyone, but researching today produced another workable clue:

    http://codex.wordpress.org/The_Loop

    which led to …

    http://codex.wordpress.org/Template_Tags/in_category

    The in_category function can be used by designating the “$cat” variable as the passed value, with the entire “post” div placed inside the if loop:

    <?php if ((in_category($cat))): ?>

    <div class="post"> ... </div>

    <?php endif; ?>

    Seems to work ….. Did I break it? …. or is this an obvious solution I should have found sooner?

    Moderator James Huff

    (@macmanx)

    That sure is a solution, but it sure isn’t “obvious”. I’m glad you found one nonetheless. Congrats.

    (FYI, you may want to try a different topic title next time. I almost didn’t click on this because I thought it was a spam topic about birth control. Heh, but it’s all in good humor. ^_-)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘I don’t want Children to show-up’ is closed to new replies.