• I am trying to set up an if statement that tags on a bit of code if selected document is part of a given category, but I want it only to function on single pages or categories.

    So far I have

    <?php if ((in_category(‘1’))): ?> current_page_item<?php endif; ?>

    how would I exclude the home page from matching this script?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘“if” question’ is closed to new replies.