Title: Custom code on specific category
Last modified: October 17, 2019

---

# Custom code on specific category

 *  [marcorroma](https://wordpress.org/support/users/marcorroma/)
 * (@marcorroma)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/custom-code-on-specific-category/)
 * Hi, how can I insert content only for posts in a category?
    I want to insert 
   something like “this is my favorite category” only in the posts of a category,
   and I want it not to appear in the posts of the other categories. The text must
   be displayed in the posts, immediately before the title. Can someone please help
   me? Thanks

Viewing 1 replies (of 1 total)

 *  [Joy](https://wordpress.org/support/users/joyously/)
 * (@joyously)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/custom-code-on-specific-category/#post-12039604)
 * You can code a filter for the title and check the category there.
    You can code
   a category-specific template (but this is for the category page). Each category
   can have a description, but this is typically only shown on the category page.
 * To add custom code, create a child theme.

Viewing 1 replies (of 1 total)

The topic ‘Custom code on specific category’ is closed to new replies.

## Tags

 * [category](https://wordpress.org/support/topic-tag/category/)
 * [code](https://wordpress.org/support/topic-tag/code/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Joy](https://wordpress.org/support/users/joyously/)
 * Last activity: [6 years, 7 months ago](https://wordpress.org/support/topic/custom-code-on-specific-category/#post-12039604)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
