Last active
May 28, 2024 13:49
-
-
Save andrewlimaza/13d5d771dd245082d97e434601a8add1 to your computer and use it in GitHub Desktop.
Paid Memberships Pro - Show login form when members are logged out (simple example)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//copy lines 4 - 9 into custom plugins file or functions.php | |
function pmpro_show_login_form(){ | |
//show a simple login form if users are logged out and a post/page requires membership | |
return wp_login_form(); | |
} | |
add_filter('pmpro_not_logged_in_text_filter', 'pmpro_show_login_form'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment