Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Lock Page/Post

makes a simple page/post locking button.

// Add Shortcode
function lockPost() {

	// Code
$html .=<<<here
<!--Lock Form:-->
<form class="lock-post alignright" action="/wp-login.php?action=postpass" method="post">
<input type="submit" value="Lock Post" />
</form>
here;
echo $html;
}
add_shortcode( 'lockPost_sc', 'lockPost' );