Viewing 18 posts - 1 through 18 (of 18 total)
  • Author
    Posts
  • #471118

    When I password protect a page under privacy settings for that page (laughingbearranch.com/resources) is there a way to customize the page which appears asking for input of the password? I’d like to add some different copy and also shorten the field for the password to be input.
    Thanks, kindly. Jen

    #471204

    Hi AirstreamCoach!

    In order to change the protected page text you can either follow the instructions under the “Customize the Protected Text” section of the WordPress codex:

    https://codex.wordpress.org/Using_Password_Protection

    Or you can follow the instructions in the below forum page:

    https://kriesi.at/support/topic/password-protected-page/

    Cheers!
    Dake

    #471210

    PLEASE HELP. I tried using some of the code you directed me to in the appearance/editor functions/php and apparently messed it up and now my site is down. Please Help! Thanks! Jen

    #471211

    Parse error: syntax error, unexpected end of file, expecting ‘`’ in /home/content/p3pnexwpnas04_data02/30/2293230/html/wp-content/themes/enfold/functions.php on line 546

    please help. thanks

    #471213

    Hi airstream,

    In order to remove the error, please reupload a copy of your functions.php file or remove the code you added via FTP.

    Best regards,
    Dake

    #471217

    got it! Thanks!!!

    #471338

    Hi!

    Glad we could help, please let us know if you should have any more problems.

    Best regards,
    Rikard

    #471683

    Hi AirstreamCoach,

    I understand that your website it up and running again, but have you attempt using the methods described in the WordPress codex?

    Regards,
    Dake

    #471691

    oh my gosh!! So, YES, per your suggestion, I got brave again and just went in to try the wordpress code on that page .. AND NOW MY SITE IS DOWN AGAIN!! why do you keep suggesting i mess with the function.php file??? sorry but i can’t believe this has happened again and now i have to go back into the ftp. very frustrating. is there something wrong with the theme that I can’t paste this code into the editor without having my site crash???

    #471696

    Now whenever i try opening the php file thru ftp and it fails. what do i do? please help me fix this and explain why the code is crashing my site, repeatedly. thanks.

    #471698

    the code i tried using was from the link you gave me. it said this would allow me to modify the text displayed on the password protected page. it crashes my site. please help.

    <?php
    function my_password_form() {
    global $post;
    $label = ‘pwbox-‘.( empty( $post->ID ) ? rand() : $post->ID );
    $o = ‘<form action=”‘ . esc_url( site_url( ‘wp-login.php?action=postpass’, ‘login_post’ ) ) . ‘” method=”post”>
    ‘ . __( “To view this protected post, enter the password below:” ) . ‘
    <label for=”‘ . $label . ‘”>’ . __( “Password:” ) . ‘ </label><input name=”post_password” id=”‘ . $label . ‘” type=”password” size=”20″ maxlength=”20″ /><input type=”submit” name=”Submit” value=”‘ . esc_attr__( “Submit” ) . ‘” />
    </form>
    ‘;
    return $o;
    }
    add_filter( ‘the_password_form’, ‘my_password_form’ );
    ?>

    #471701

    Parse error: syntax error, unexpected ‘<‘ in /home/content/p3pnexwpnas04_data02/30/2293230/html/wp-content/themes/enfold/functions.php on line 538

    please help.

    #471707

    Hey AirstreamCoach,

    In order to bring your site back online, you’ll need to re upload your functions.php file.

    The available code in the codex is the recommended method when editing the default password protection page.

    You have 3 other alternatives that you can try:

    – You can make a copy of the twentyfifteen theme’s functions.php file then attempt using the php code from the codex again.

    – You can try using a password protection plugin that provides you with a member system and an editable password page.

    – Lastly, you could try enlisting the help of a freelancer: http://kriesi.at/contact/customization

    Cheers!
    Dake

    #471711

    thanks. But, why does adding a code snippet crash my site? it’s a simple procedure, cut and past directly from the source, am placing it at the very end of the functions.php from within the editor.. am i doing something wrong?

    #471714

    ps. i restored the .php again. so we are back up. thanks for your suggestions. i did look for a password protection plug in but didn’t find anything. do you recommend one? thanks and sorry for the panic. i’m probably doing something wrong in how i edit the php.

    #471724

    Hi AirstreamCoach!

    I double checked then noticed in your previous post, you were copying the php tags that are included in the code snippet as well.

    Rightfully the only code you should be pasting is what’s within php tags because it is already open in the original document (functions.php):

    function my_password_form() {
        global $post;
        $label = 'pwbox-'.( empty( $post->ID ) ? rand() : $post->ID );
        $o = '<form action="' . esc_url( site_url( 'wp-login.php?action=postpass', 'login_post' ) ) . '" method="post">
        ' . __( "To view this protected post, enter the password below:" ) . '
        <label for="' . $label . '">' . __( "Password:" ) . ' </label><input name="post_password" id="' . $label . '" type="password" size="20" maxlength="20" /><input type="submit" name="Submit" value="' . esc_attr__( "Submit" ) . '" />
        </form>
        ';
        return $o;
    }
    add_filter( 'the_password_form', 'my_password_form' );

    As for the protected page plugin, you can try a freemium plugin such as Membership 2.

    Cheers!
    Dake

    #471735

    that explains it. thanks.

    #471740

    Hi AirstreamCoach,

    You’re welcome. Please let us know if there’s anything else we can assist you with.

    Cheers!
    Dake

Viewing 18 posts - 1 through 18 (of 18 total)
  • The topic ‘Displaying .pdfs’ is closed to new replies.