// Add Shortcode function lockPost() { $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' );