Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • theatereleven is correct, You would need to redo this process with new WP updates, so he recommends a direct solve for it.

    And thanks Mark!

    Its just my personal preference to target the source code rather then going through the theme’s functions. ALWAYS BACK UP YOUR CODE. Change at your own risk. If you leave out a bracket or parentheses — you will break the code. And then may have to reinstall WP or replace the whole file being targeted.

    I have changed the BG color in my theme’s style — therefore I had to change the default color of the text as well as a custom password message color. Below, I was able to override it with inline code adding style tags: Note I added (3) STYLE tags

    The line number has changed… I now scrolled down to line #15??
    go to your host WP folder > wp-includes > post-template.php >

    function get_the_password_form( $post = 0 ) {
    $post = get_post( $post );
    $label = ‘pwbox-‘ . ( empty($post->ID) ? rand() : $post->ID );
    $output = ‘<form action=”‘ . esc_url( site_url( ‘wp-login.php?action=postpass’, ‘login_post’ ) ) . ‘” class=”post-password-form” method=”post”>

    <p style=”color:white;”>’ . __( ‘Thanks for stopping by. The Projects page is password protected, enter it below or email me to request one:’ ) . ‘</p>

    <p><label for=”‘ . $label . ‘”>’ . __( ‘Password:’ ) . ‘ <input name=”post_password” style=”color:white;” id=”‘ . $label . ‘” type=”password” size=”20″ /></label> <input type=”submit” style=”color:white;” name=”Submit” value=”‘ . esc_attr__( ‘Submit’ ) . ‘” /></p>

    </form>
    ‘;

    [moderator note and warning: IT IS NEVER A GOOD IDEA TO EDIT WP CORE FILES]

    Your note here’ = <a href=”mailto:[email protected]” </a

    I can say there is a better more direct approach.
    go to your host account where you host WP folder > wp-includes > post-template.php > scroll down to line #1663 (at least that is the location for me)
    You will find the password block of code. Follow method below to add mailto: or change the language within:
    line #1663 look like this, change content located between <P> tags:

    function get_the_password_form( $post = 0 ) {
    $post = get_post( $post );
    $label = ‘pwbox-‘ . ( empty($post->ID) ? rand() : $post->ID );
    $output = ‘<form action=”‘ . esc_url( site_url( ‘wp-login.php?action=postpass’, ‘login_post’ ) ) . ‘” class=”post-password-form” method=”post”>

    <p>’ . __( ‘This content is password protected. Your note here:‘ ) . ‘</p>

    <p><label for=”‘ . $label . ‘”>’ . __( ‘Password:’ ) . ‘ <input name=”post_password” id=”‘ . $label . ‘” type=”password” size=”20″ /></label> <input type=”submit” name=”Submit” value=”‘ . esc_attr__( ‘Submit’ ) . ‘” /></p></form>
    ‘;

Viewing 3 replies - 1 through 3 (of 3 total)