• Resolved FECKcorp

    (@feckcorp)


    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() ) {?>
    
    THIS TEXT
    
    <?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!

Viewing 2 replies - 1 through 2 (of 2 total)
  • try either:
    <?php if (! is_home() && ! is_category() && ! is_single() ) {?>
    or:
    <?php if (!( is_home() || is_category() || is_single() ) ) {?>

    Thread Starter FECKcorp

    (@feckcorp)

    ^ You, sir, are a genius.

    It works perfectly now. Much appreciated!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Conditional Tags – small issue’ is closed to new replies.