Title: Highlight recently changed posts?
Last modified: August 20, 2016

---

# Highlight recently changed posts?

 *  [Adam](https://wordpress.org/support/users/gourmetbooks/)
 * (@gourmetbooks)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/highlight-recently-changed-posts/)
 * Hi wonderful WP forum-ers,
 * I’m trying to put together what I assume (and hope) is a very simple function,
   and I’m totally lost.
 * I have a list of posts, organized by category, and I want to highlight (in a 
   way that I can style by CSS later) recently changed ones. That is, posts whose
   last modification date was X-days ago. I’ve scoured for plugins, and can’t find
   one that does the trick. I know WordPress keeps track of post revisions, so I
   hope this is entry-level stuff, and I’m just too PHP-challenged to sort it out.
 * Please help! Thank you!

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

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/highlight-recently-changed-posts/#post-3013807)
 * general idea:
 *     ```
       $days = 4;
       if( (date('U') - get_the_modified_date('U')) <= 86400*$days ) { /*some action or output*/ };
       ```
   
 * [http://codex.wordpress.org/Function_Reference/get_the_modified_date](http://codex.wordpress.org/Function_Reference/get_the_modified_date)
   
   [http://php.net/manual/en/function.date.php](http://php.net/manual/en/function.date.php)
 * where exactly to use the code, depends on your theme, and the structure of your‘
   list of posts, organized by category’.
 *  Thread Starter [Adam](https://wordpress.org/support/users/gourmetbooks/)
 * (@gourmetbooks)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/highlight-recently-changed-posts/#post-3013953)
 * Thanks! This gives me a huge head-start.

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

The topic ‘Highlight recently changed posts?’ is closed to new replies.

## Tags

 * [track changes](https://wordpress.org/support/topic-tag/track-changes/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [Adam](https://wordpress.org/support/users/gourmetbooks/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/highlight-recently-changed-posts/#post-3013953)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
