Title: snee7's Replies | WordPress.org

---

# snee7

  [  ](https://wordpress.org/support/users/snee7/)

 *   [Profile](https://wordpress.org/support/users/snee7/)
 *   [Topics Started](https://wordpress.org/support/users/snee7/topics/)
 *   [Replies Created](https://wordpress.org/support/users/snee7/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/snee7/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/snee7/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/snee7/engagements/)
 *   [Favorites](https://wordpress.org/support/users/snee7/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Protect Old Posts](https://wordpress.org/support/topic/protect-old-posts/)
 *  Thread Starter [snee7](https://wordpress.org/support/users/snee7/)
 * (@snee7)
 * [19 years, 10 months ago](https://wordpress.org/support/topic/protect-old-posts/#post-242673)
 * Or you could just take the plugin and reverse it. Take the area where they insert
   your new password (‘CHANGEME’) and leave it blank, and then take the blank area
   where it changes all non-protected posts and put in the password you used.
 * That will change all posts with that password into no password. Then upload and
   reactivate the plugin. For instance:
 * $default_password = ”;
 * function mm_something_changed($something) { // This is extremely crude
    global
   $wpdb, $tableposts, $default_password; $count = $wpdb->get_var(“SELECT COUNT(*)
   FROM $tableposts WHERE post_status = ‘publish'”); $one = $count – 1; $wpdb->query(“
   UPDATE $tableposts SET post_password = ‘$default_password’ WHERE post_status 
   = ‘publish’ AND post_password = ‘*************THE PASSWORD YOU USED********’ 
   ORDER BY post_date_gmt ASC LIMIT $one”); return $something;
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Protect Old Posts](https://wordpress.org/support/topic/protect-old-posts/)
 *  Thread Starter [snee7](https://wordpress.org/support/users/snee7/)
 * (@snee7)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/protect-old-posts/#post-242664)
 * Yup, I’m bringing up an old unresolved issue. I have still been unable to modify
   the plugin to protect all posts beyond a certain date or number. Any advice?
   `
   $default_password = 'changeme';
 * function mm_something_changed($something) { // This is extremely crude
    global
   $wpdb, $tableposts, $default_password; $count = $wpdb->get_var("SELECT COUNT(*)
   FROM $tableposts WHERE post_status = 'publish'"); $one = $count - 1; $wpdb->query("
   UPDATE $tableposts SET post_password = '$default_password' WHERE post_status 
   = 'publish' AND post_password = '' ORDER BY post_date_gmt ASC LIMIT $one"); return
   $something; }
 * I tried by editing the ASC limit among a million other things, but it’s been 
   quite a few months since I’ve tried messing with it and I’d still like to do 
   it. Any suggestions?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Protect Old Posts](https://wordpress.org/support/topic/protect-old-posts/)
 *  Thread Starter [snee7](https://wordpress.org/support/users/snee7/)
 * (@snee7)
 * [20 years, 9 months ago](https://wordpress.org/support/topic/protect-old-posts/#post-242551)
 * It password protects old posts with a default password set in the plugin. I’d
   still like to be able to give people this password who I know personally, so 
   it would be the ideal setup.

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