[resolved] Conditional Tags - small issue (3 posts)

  1. FECKcorp
    Posted 5 years ago #

    I am trying to display "THIS TEXT" on all pages that are not the homepage, a category index, or a single post. I tried the following code as recommended by WordPress' Codex but "THIS TEXT" is still showing up on all pages.

    <?php if (! is_home() || ! is_category() || ! is_single() ) {?>
    <?php }?>

    Is there a special formatting for inputing is not (!) conditional tags? Or, better yet, what is wrong with the code above and how can I fix it?

    Thank you all very much!

  2. Michael
    Forum Moderator
    Posted 5 years ago #

    try either:
    <?php if (! is_home() && ! is_category() && ! is_single() ) {?>
    <?php if (!( is_home() || is_category() || is_single() ) ) {?>

  3. FECKcorp
    Posted 5 years ago #

    ^ You, sir, are a genius.

    It works perfectly now. Much appreciated!

Topic Closed

This topic has been closed to new replies.

About this Topic