Provides a template tag for a link for visitors to log out of password protected posts.
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.
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.
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.
Requires: 4.1 or higher
Compatible up to: 4.5.3
Last Updated: 5 months ago
Active Installs: 1,000+
0 of 1 support threads in the last two months have been marked resolved.
Got something to say? Need help?