• I am totally stumped on how to unmask the password and not break the multiple passwords functionality. Here’s my functions.php file content:

    <?php

    // Defines
    define( ‘FL_CHILD_THEME_DIR’, get_stylesheet_directory() );
    define( ‘FL_CHILD_THEME_URL’, get_stylesheet_directory_uri() );

    // Classes
    require_once ‘classes/class-fl-child-theme.php’;

    // Actions
    add_action( ‘fl_head’, ‘FLChildTheme::stylesheet’ );

    function customized_password_text($content) {
    $before = ‘Password:’;
    $after = ‘Zip Code:’;
    $content = str_replace($before, $after, $content);
    return $content;
    }
    add_filter(‘the_password_form’, ‘customized_password_text’);

    function customized_prompt_text($content) {
    $before = ‘This post is password protected. To view it please enter your password below:’;
    $after = ‘Rates subject to positive residency verification before admission. <br/>Please enter your Zip Code in the box below.’;
    $content = str_replace($before, $after, $content);
    return $content;
    }
    add_filter(‘the_password_form’, ‘customized_prompt_text’);

    The page I need help with: [log in to see the link]

The topic ‘Unmask password for protected pages’ is closed to new replies.