• Resolved deckster0

    (@deckster0)


    The usual code looks like this:
    <?php if(is_category(2,4,5,54,4,5,etc)); {?>Display in category<? php } ?>
    I want to by default display something on my category pages. Except on a few pages.

Viewing 4 replies - 1 through 4 (of 4 total)
  • MichaelH

    (@michaelh)

    Sorry, you will need to better explain what you are trying to do.

    Thread Starter deckster0

    (@deckster0)

    Okay, Ill explain a bit more.

    I have 100 categories and I want to display a big “click me” button on top of each archive page, except for in the categories, for example(ID): 54,5 and 6. How am I supposed to accomplish that?

    esmi

    (@esmi)

    Try:

    <?php if (!is_category('54', '5', '6') :?>
    [ big button markup ]
    <?php endif;?>

    Thread Starter deckster0

    (@deckster0)

    Problem solved!

    @esmi That wasn’t really the code I was looking for.

    I suck at explaining so:

    <?php if(is_category('54','5','6')) {?>
    [button code goes here]
    <?php } else {?>
    [default button displayed]
    <?php }?>
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Do not display only in certain categories.’ is closed to new replies.