Sorry for not mentioning it in full earlier, but this is the code I already had:
add_filter( 'the_password_form', 'custom_password_form' );
function custom_password_form() {
global $post;
$label = 'pwbox-'.( empty( $post->ID ) ? rand() : $post->ID );
$o = '<form class="protected-post-form post-password-form" action="' . get_option('siteurl') . '/wp-login.php?action=postpass" method="post">'.
__( "Password-protected area." ).
'<div class="col-md-2 col-md-offset-5">
<input name="post_password" class="form-control" id="' . $label . '" type="password" style="font-size:22px; border-radius:.5rem; text-align:center;" />
<br />
<input type="submit" name="Submit" class="btn btn-block" style="font-weight:bold;" value="'. esc_attr__( "Login" ).'" />
</div>
<input type="hidden" name="_wp_http_referer" value="'.get_permalink().'" />
</form>';
return $o;
}
-
This reply was modified 7 years, 10 months ago by itsthenewdc.
-
This reply was modified 7 years, 10 months ago by itsthenewdc.
-
This reply was modified 7 years, 10 months ago by itsthenewdc.