[resolved] Tag Template (2 posts)

  1. Robert Dall
    Posted 3 years ago #

    If I have posts in two different categories and they both have tags. What would be the best way to style the tag templated depending on which category the tag is connected to.

    I am scratching my head on how to solve this one… 

  2. Robert Dall
    Posted 3 years ago #

    Ok so even though my question didn't make much sense Thanks to Christine Rondeau and Joey Kudish. I have the answer!!!

    So If I wanted to customize the tag.php template file you can use conditional statement.

    For Example

    <?php if(in_category( 'category' )) { ?>
    // Do stuff
    <?php } else { ?>
    // Do other stuff that is not in other category 
    <?php }?>

    And yes this completely works in the tag.php template file… 

    And if you don't get this at least I have answered my own question :)

Topic Closed

This topic has been closed to new replies.

About this Topic