• 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…?

Viewing 1 replies (of 1 total)
  • Thread Starter Robert Dall

    (@rdall)

    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 ??

Viewing 1 replies (of 1 total)
  • The topic ‘Tag Template’ is closed to new replies.