WordPress Plugin: Logout Password Protected Posts

Latest version: 0.2 – Released 28/03/2016

Description

There is no built-in way for your visitors to “log out” of password protected posts once they’ve entered the password. Even logged in users cannot log out of password protected posts by logging out of their account. This plugin solves that problem by providing a link for your visitors to log out of password protected posts.

After installing the plugin, add <?php do_action( 'posts_logout_link' ); ?> somewhere in your theme to display a link for logging out of password protected posts.

Installation

You can install this plugin directly from your WordPress dashboard:

  1. Go to the Plugins menu and click Add New.
  2. Search for Logout Password Protected Posts.
  3. Click Install Now next to the Logout Password Protected Posts plugin.
  4. Activate the plugin.
  5. Add <?php do_action('posts_logout_link'); ?> somewhere in your theme.

Those people who are logged in to password protected posts will now see a link to log out.

For manual installation, see the guide to Manually Installing Plugins.

FAQ

I can’t see a link to log out. What’s up?

Have you added the template tag somewhere in your theme? You need to add <?php do_action( 'posts_logout_link' ); ?> somewhere in your theme for the link to show up.

I’ve added the template tag to my theme but I can’t see the log out link. What’s up?

Ensure that you have entered a password for a password protected post. The link will not show up if you’re not logged into a password protected post.

Can I change the default text in the link?

Sure. Add a second parameter to the template tag with the text you’d like instead. For example: <?php do_action( 'posts_logout_link', 'Log out!' ); ?>

For those who want even more control, you can also add a third paramter which will be used as the class name on the link element.

Download

Version 0.2 ZIP file from downloads.wordpress.org

Any comments, questions, queries, suggestions, complaints, etc, please leave a comment!

WordPress Plugin: Global Post Password

Latest version: 1.5.1– Released 28/03/2016
  • When passing a password via the URL parameter, ensure the password cookie’s behavior matches that of core’s.
  • Correctly handle passwords which need to be encoded when used in the URL parameter.
  • Add escaping to all translated text.
  • Various code quality tweaks.

Description

If you publish many password protected posts (or even if you don’t), you may end up using the same password for each one. With this plugin you can define a global password from your ‘Settings -> Global Post Password’ menu, and switch password protection on or off from the writing screen with just one click. Whenever you change the global password, all password protected posts are automatically updated with the new password.

Note that this plugin does not automatically enable password protection on every post. It allows you to use a global password for every post that you choose to password protect.

Installation

  • Unzip the ZIP file and drop the folder straight into your wp-content/plugins/ directory.
  • Activate the plugin through the ‘Plugins’ menu in WordPress.
  • Visit the ‘Settings -> Global Post Password’ menu in WordPress and set a global post password.

Now whenever you write or edit a post or page you’ll be able to switch password protection on or off with one click, instead of having to manually type in a password for each post. You can change the password whenever you like.

More Information

Please see the plugin’s page on the WordPress Plugin Directory for more information, including FAQs.

Download

ZIP file from downloads.wordpress.org

Any comments, questions, queries, suggestions, complaints, etc, please leave a comment below!