Blocked page redirect not working, layout is borked
-
I’ve got a page using a default template blocked, but the resulting page for logged out users is messed up. The page is lacking a content container, probably due to use of Avia layout builder.
I’ve written this into an active plugin:
// Have wp-members blocked pages redirect instead of showing borked login / register forms add_filter( 'wpmem_login_redirect', 'my_login_redirect', 10, 2 ); function my_login_redirect( $redirect_to, $user_id ) { // return the url that the login should redirect to return 'https://example.com/login'; }
It doesn’t appear to be in use at all for blocked pages. I’ve seen the content for creating a custom template page for logged in / logged out users, but I’m hoping there’s something simpler. Is it not possible to just redirect logged out users to a custom page when visiting a blocked page?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Blocked page redirect not working, layout is borked’ is closed to new replies.