-
AuthorPosts
-
January 9, 2018 at 12:57 am #895032
Hi
I have one page on my site that is password protected (via the post options). When the password protected page opens, it has a header and menu displayed, which I don’t want as I don’t have a header or menu on any other pages (don’t ask…)
I just want the password page (the one that says “This content is password protected. To view it please enter your password below:” to display the message and the form box only. No menu, no header.
I can’t find that page anywhere to customise! I’d also like to be able to alter that message, and create a message when someone puts in the wrong password.
Can anyone help?
Thank you!
January 9, 2018 at 7:07 am #895119Hey victoria,
Maybe this thread will help you out? https://kriesi.at/support/topic/edit-contenttext-on-password-protected-page/
Best regards,
RikardJanuary 9, 2018 at 9:07 am #895149Hi Rikard
Thank you for that. I will put it to work!
It doesn’t help me with the menu/header problem, however. There is still a header with a menu on the password protected page that I can’t get rid of (despite not having any menu’s set up, it’s pulling them from my page titles anyway).
I’m sure there must be a simple line of code to made that page not have any header, though I can’t find any way to identify that page to edit it!
Thank you
January 9, 2018 at 9:54 am #895157A little extra information, as I have read through the other post you highlighted and it explains that the password page isn’t really a page, but just covers up the content until you unlock it.
I have a landing page, you press a button to visit the next page – which is password protected.
There is no menu set in Appearances, the header/sidebars/footer etc are all removed from landing page and from the main content page (once password accepted). So no header/menu on either of the pages. BUT when the password form comes up, it sticks a header&menu at the top. So I don’t know where it’s getting that instruction from.
Thanks
January 9, 2018 at 11:24 am #895178Hi,
Thanks for the feedback, could you post a link to your site so that we can have a closer look at it? Also please post a link to a password protected page, maybe we can give you some CSS to use.
Best regards,
RikardJanuary 9, 2018 at 12:34 pm #895205Ok, some information below
January 11, 2018 at 10:29 pm #896268Hi,
Just add
#header_main { display: none; } to quick fix your issue as it is not something big
and you are simple done.There is no ” canva ” template option into Enfold.
Best regards,
BasilisJanuary 25, 2018 at 2:56 am #902464Brilliant. Thank you for this. That has worked a treat.
I don’t know how, but I have lost the code that I had added that brought up a message when an incorrect password is attempted.
I’ve tried inserting various code that I’ve found on forum threads and the internet, but can’t get it to work. Not sure how I did it last time, or where it’s gone!
Are you able to give me code to add to create an incorrect password message, please?
I have added the following to functions.php to change the ‘please input password’ text:
add_filter( 'the_password_form', 'custom_password_form' ); function custom_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' ) ) . '" class="post-password-form" method="post">' . __( "You can write your own text here" ) . ' <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 $o; }
January 29, 2018 at 11:37 am #904170Hi,
Unfortunately, it would require quite some time and customization of the theme to achieve this, so I am sorry to tell you that this is not covered by our support. However, if it’s really important for you to get this done, you can always hire a freelancer to do the job for you :)
Best regards,
BasilisNovember 6, 2019 at 9:14 pm #1154410I will change the text of the Password protection page. But, if i will add a link, the funktion.php does not aczept this. What is the right way to put a link next to the text? If i do like in the code, it does not work.
add_filter( 'the_password_form', 'custom_password_form' ); function custom_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' ) ) . '" class="post-password-form" method="post">' . __( "You can write your own text here <a href=\"https://nameofthepage/undername/\">linkname</a>" ) . '<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 $o; }
- This reply was modified 5 years, 1 month ago by Micha66.
November 11, 2019 at 10:51 am #1155529 -
AuthorPosts
- You must be logged in to reply to this topic.