Tag Info

New answers tagged

2

Basic how and why Extending on my blog post about that topic: When you enter a password into a form built by get_the_password_form(), the form targets ~/wp-login.php with a query argument named postpass which is the $action the login file uses to switch. There the PasswordHash class gets into use and a cookie gets set [...] When does it happen? The ...


0

Try reversing the condition : if(post_password_required( )): echo get_the_password_form(); else: // if password not required or password cookie is present // your protected content here endif; See codex Hope that helps.


0

The easier way can be have a group of users called teachers and give just the teacher's group the permission to visit the page. There are many plugins for permission handling and grouping users so you'll just need to search WordPress plugin repository. Just an example: groups plugin Another possible answer can be : multi page password protection (As I ...


1

I think the better solution would be to create a custom page template for showing content to logged in users only and use that template to all password protected pages. Then you can create a single user for teachers/staff members so they can log in and view content. This way they will only have to login once on website to view several pages. Even they don't ...


0

This is technically challenging. WordPress must have access to your DB password in plain text. Having access to wp-config.php contents is already breach of security in progress. There are alternate approaches to configuration, such as loading credentials via environmanet variables, but in practice they are used exceedingly rarely because PHP config file is ...



Top 50 recent answers are included