/ Published in: PHP
Thanks to Tummel.me
Works on newer (~3.4) versions of WP.
Works on newer (~3.4) versions of WP.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// add to functions.php add_filter( 'the_password_form', 'custom_password_form' ); function custom_password_form() { global $post; $o = '<form class="protected-post-form" action="' . get_option('siteurl') . '/wp-login.php?action=postpass" method="post"> ' . __( "MESSAGE TO APPEAR ABOVE THE FORM" ) . ' <label class="pass-label" for="' . $label . '">' . __( "PASSWORD:" ) . ' </label><input name="post_password" id="' . $label . '" type="password" size="30" /><input type="submit" name="Submit" class="button" value="' . esc_attr__( "Submit" ) . '" /> </form> MESSAGE TO APPEAR BELOW FORM'; return $o; }
URL: http://tummel.me/wordpress-3-4-custom-password-form/