/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php $category = get_the_category();?> <?php if($category[0]->cat_name == 'Title1'): ?> <h2>Title 1</h2> <?php else : ?> <h2>Title 2</h2> <?php endif ?>