Title: Making a plugin work sometimes
Last modified: August 18, 2016

---

# Making a plugin work sometimes

 *  [thejoker101](https://wordpress.org/support/users/thejoker101/)
 * (@thejoker101)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/making-a-plugin-work-sometimes/)
 * I have a “friendly post times” type of plugin that I wrote. It hooks on the the_time().
   However, I’d like it to only work on the main page and not individual posts. 
   Is there a way to make it work only sometimes?
 * I could do it if i was able to pass in another variable with the_time(). Is there
   a way to do that?
 * Thanks again.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [carthik](https://wordpress.org/support/users/carthik/)
 * (@carthik)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/making-a-plugin-work-sometimes/#post-181362)
 * You can wrap it in another function is_home();
 * You’ll hopefully find
    [http://codex.wordpress.org/Conditional_Tags](http://codex.wordpress.org/Conditional_Tags)
 * to be very useful 🙂
 *  Thread Starter [thejoker101](https://wordpress.org/support/users/thejoker101/)
 * (@thejoker101)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/making-a-plugin-work-sometimes/#post-181376)
 * Thanks buddy.
 * 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Making a plugin work sometimes’ is closed to new replies.

 * 2 replies
 * 2 participants
 * Last reply from: [thejoker101](https://wordpress.org/support/users/thejoker101/)
 * Last activity: [21 years, 1 month ago](https://wordpress.org/support/topic/making-a-plugin-work-sometimes/#post-181376)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
