Forums

[resolved] help on PHP if command (3 posts)

  1. startribe
    Member
    Posted 2 years ago #

    Hey Community,

    I am trying to come up with a conditional command that will display or write and s if the the page is of my interview category. What I have is:
    <?php if(is_category('interview')) { echo ('s')}; ?>

    I know I'm off, and any help would be greatly appreciated.

    Thanks,
    orion

  2. Kafkaesqui
    Moderator
    Posted 2 years ago #

    Well, this:

    <?php if( is_category('interview') ) { echo 's'; } ?>

    should work. That is, if it's really on a category query (and not a single post page for a post in that category).

  3. startribe
    Member
    Posted 2 years ago #

    It worked!

    I love this forum, I am looking forward to when I get good enough to help with this stuff too.

    Thank you so much Kafkaesqui,
    All the Best,
    Orion

Topic Closed

This topic has been closed to new replies.

About this Topic