Title: Featured post hack
Last modified: August 21, 2016

---

# Featured post hack

 *  Resolved [Swedish_Soul](https://wordpress.org/support/users/swedish_soul/)
 * (@swedish_soul)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/featured-post-hack/)
 * I’m developing a theme for multiple bloggers that should have give the bloggers
   the ability to feature their posts on the front page, but only one post per week.
 * So, to break it down:
    Featured checkbox in post view (not hidden away), clicking
   the box and publish the post will set a time-stamp for the profile and make the
   post featured, the box won’t be clickable again until a week later.
 * Anyone know how I can make this happen?

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

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/featured-post-hack/#post-4195454)
 * The easy part is setting a timestamp in user meta when a featured post is published.
   I see no clean way to suppress the checkbox in PHP though. What might be possible
   is to enqueue jQuery that hides or changes the checkbox container. The script
   could be selectively enqueued only when the current user’s timestamp is fresher
   than a week and the current screen is post edit or quick edit.
 *  Thread Starter [Swedish_Soul](https://wordpress.org/support/users/swedish_soul/)
 * (@swedish_soul)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/featured-post-hack/#post-4195465)
 * What I’m struggling with though is how to add the timestamp to the profile.
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/featured-post-hack/#post-4195502)
 * `update_user_meta( get_current_user_id(), 'last_featured', time());`
 * Hook into ‘draft_to_publish’ which only fires when a post is first published.
   If you want to see this value in the profile it’s more involved, but doable. 
   How depends on where you want it to appear.
 *  Thread Starter [Swedish_Soul](https://wordpress.org/support/users/swedish_soul/)
 * (@swedish_soul)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/featured-post-hack/#post-4195582)
 * So, I finally got it to work. I used a third party plugin since I couldn’t save
   my own field for some reason. Have to check that out in the future when I make
   an update. But for now, it’s working.
 * Thanks for your help½
 *  Thread Starter [Swedish_Soul](https://wordpress.org/support/users/swedish_soul/)
 * (@swedish_soul)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/featured-post-hack/#post-4195583)
 * Sorry, forgot to click resolved.

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

The topic ‘Featured post hack’ is closed to new replies.

## Tags

 * [featured](https://wordpress.org/support/topic-tag/featured/)
 * [function](https://wordpress.org/support/topic-tag/function/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 5 replies
 * 2 participants
 * Last reply from: [Swedish_Soul](https://wordpress.org/support/users/swedish_soul/)
 * Last activity: [12 years, 8 months ago](https://wordpress.org/support/topic/featured-post-hack/#post-4195583)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
