Title: protected post
Last modified: August 19, 2016

---

# protected post

 *  [sefran](https://wordpress.org/support/users/sefran/)
 * (@sefran)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/protected-post/)
 * Hi.
    Is there a function call (or anything else way) to verify that a post is
   protected? Thanks in advance.

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

 *  [mrmist](https://wordpress.org/support/users/mrmist/)
 * (@mrmist)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/protected-post/#post-1116582)
 * Do you want a way of checking in php code, or just to confirm it?
 *  Thread Starter [sefran](https://wordpress.org/support/users/sefran/)
 * (@sefran)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/protected-post/#post-1116585)
 * I want to check it in php code so that I can do something if the post is protected
   or not.
 *  [mrmist](https://wordpress.org/support/users/mrmist/)
 * (@mrmist)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/protected-post/#post-1116589)
 * In a WordPress plugin or similar you could use post_password_required(postid)
 * Outside of that, if you google for post_password_required you can find the code
   behind it (which is in wp-includes/post-template.php) and go from there.
 *  Thread Starter [sefran](https://wordpress.org/support/users/sefran/)
 * (@sefran)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/protected-post/#post-1116615)
 * Thank you very much. The post_password_required(postid) is perfect.
    Ciao, Fran
 *  Thread Starter [sefran](https://wordpress.org/support/users/sefran/)
 * (@sefran)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/protected-post/#post-1116625)
 * From which WP version post_password_required(postid) works?
    From 2.7.1. Confirm?
   I have an “undefined function post_password_required()” message when I try my
   plugin with WP 2.7, while it works with WP 2.7.1.
 *  Thread Starter [sefran](https://wordpress.org/support/users/sefran/)
 * (@sefran)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/protected-post/#post-1116666)
 * Sorry… it works well also with WP 2.7 version, I was trying with an older version.
   
   The post_password_required() is defined from WP 2.7 version.

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

The topic ‘protected post’ is closed to new replies.

## Tags

 * [protected posts](https://wordpress.org/support/topic-tag/protected-posts/)

 * In: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
 * 6 replies
 * 2 participants
 * Last reply from: [sefran](https://wordpress.org/support/users/sefran/)
 * Last activity: [16 years, 11 months ago](https://wordpress.org/support/topic/protected-post/#post-1116666)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
