Support » Fixing WordPress » php syntax for conditional tag

  • Here’s current code from the template:

    <?php /* If this is a category archive */ if (is_category()) { ?>
    <h2>More articles about ‘<?php single_cat_title(); ?>’</h2>
    <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
    <h2>More articles tagged ‘<?php single_tag_title(); ?>’</h2>
    Right now for all category pages is_category() the text
    'More articles about' is displayed.

    I need an additional clause that displays
    ‘More articles from’ instead for only 1 specific categors:
    the category guest-bloggers:

    I just don’t know how to do the correct php syntax to separate between these 2 variations of category.

    You can find and test it in the archive.php of the news theme.

    Conditional tags documentation is here:
    Conditional tags

    Please Help me…Thank You..

  • The topic ‘php syntax for conditional tag’ is closed to new replies.