aebrigham
Member
Posted 2 years ago #
Quick Question.
I have created a custom template for a page... created a file called rsvp-template.php and put it in the theme's directory. Inserted the code I wanted, which is really just basic Form HTML...
If I go into the WordPress Dashboard and Password protect the page, it doesn't work with the custom template. If I revert back to the Default Template, of course my page won't be the same, but the password protected page works.
Any help would be appreciated.
It's working for me at my blog: http://benpartch.org/password-protected-test-page/ Password is password
Did you select the custom page template from the drop down list while creating the page in question?
aebrigham
Member
Posted 2 years ago #
Hi BPartch,
Thank-you I was able to resolve this.
...Andrew
newtrouble
Member
Posted 2 years ago #
Hi Andrew
How did you resolve it? I'm having big problems with the password protected feature. First it worked fine. Now no matter what template I use it won't work at all.
charlesgallant
Member
Posted 2 years ago #
Yes - please tell! I've read in another thread that post_password_required() will return true/false depending on whether or not the user is authenticated, but the details were left out :\
Thanks,
C
natalievi
Member
Posted 2 years ago #
Yes! Please share. I've been trying to figure this out for a long time, and no resolution has worked for me. I know it has to do with custom templates.
How did you fix it??
drogers1949
Member
Posted 2 years ago #
ditto!!
There has to be a solution to this.
In case you are looking to modify the generic "This post is password protected. To view.." form, you can add a filter into the functions.php file, like so:
<?php
add_filter('the_password_form', 'custom_the_password_form');
function custom_the_password_form() {
$output = 'YOUR CUSTOM FORM AND TEXT HERE';
return $output;
}
?>
You can view the original code in post-template.php on lines 1132 - 1141.