I have a private VIP page on my website (www.matt-morse.com/VIP) that I have created as a ‘password protected page’. How can I modify what displays on login screen to include images, modern exciting ‘Enter’ button, etc…?
Hi mattmorse!
You can add this on functions.php:
add_filter( 'the_password_form', 'avf_custom_password_form' );
function avf_custom_password_form() {
global $post;
$label = 'pwbox-'.( empty( $post->ID ) ? rand() : $post->ID );
$before = '<form class="protected-post-form" action="' . get_option('siteurl') . '/wp-pass.php" method="post">
' . __( "<img src='IMAGE URL HERE'>This post is password protected. To view it please enter your password below:" ). '
<label for="' . $label . '">' . __( "Password:" ) . ' </label><input name="post_password" id="' . $label . '" type="password" size="20" /><input type="submit" name="Submit" value="' . esc_attr__( "Submit" ) . '" />
</form>
';
return $before;
}
On the $before variable, you can change the image url, add text, divs etc.
Best regards,
Ismael
MM
Whats up with your hosting zzz……….
Hi!
I’ll close this thread now…
Best regards,
Peter