Title: Making a function act on only category posts
Last modified: August 20, 2016

---

# Making a function act on only category posts

 *  [rgb_life](https://wordpress.org/support/users/rgb_life/)
 * (@rgb_life)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/making-a-function-act-on-only-category-posts/)
 * I have simple question. I’ve written two functions to replace the byline and 
   entry-meta with some custom code on all posts.
 * The problem is that it applies to all posts and entries, including before and
   after single page content.
 * I’ve set up the pages so that all posts take a category, then get displayed on
   their respective pages.
 * So If I can simply apply the functions to **only posts with categories**, then
   It should work.
 * How can I do that?

The topic ‘Making a function act on only category posts’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [rgb_life](https://wordpress.org/support/users/rgb_life/)
 * Last activity: [14 years, 9 months ago](https://wordpress.org/support/topic/making-a-function-act-on-only-category-posts/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
