Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #237398

    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…?

    #237433

    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

    #242558

    MM
    Whats up with your hosting zzz……….

    #242629

    Hi!

    I’ll close this thread now…

    Best regards,
    Peter

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Attractive VIP Login Screen’ is closed to new replies.