Blocking Page with Custom Template
-
Latest version of WP-Members (free), latest WordPress.
Have a page that is set for blocking (default is not blocking) that uses a custom template.
How do I block access if user not logged in. Have tried this code at the top of the custom template, but does not redirect to login page (login page is set in options) (code as suggested by documentation)
add_filter( 'wpmem_login_redirect', 'my_login_redirect', 10, 2 );function my_login_redirect( ) {
// return the url that the login should redirect to
return 'https://www.mysite.com/residents-log-in/';
}All I get is the page without content (headers, footers, widgets, etc.)
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Blocking Page with Custom Template’ is closed to new replies.