Title: Diefferent HTML code for every category
Last modified: August 18, 2016

---

# Diefferent HTML code for every category

 *  [Marcomail](https://wordpress.org/support/users/marcomail/)
 * (@marcomail)
 * [18 years, 11 months ago](https://wordpress.org/support/topic/diefferent-html-code-for-every-category/)
 * I would use different HTML based to the category of the post, for example:
 * <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
 * <?php if ( in_category(14) ) {?>
 * html html html
 * in_category(15)
 * html html html
 * <?php else ?>
 * html html
 * how can i do this ?

The topic ‘Diefferent HTML code for every category’ is closed to new replies.

 * 0 replies
 * 1 participant
 * Last reply from: [Marcomail](https://wordpress.org/support/users/marcomail/)
 * Last activity: [18 years, 11 months ago](https://wordpress.org/support/topic/diefferent-html-code-for-every-category/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
