• Resolved mmasouddd

    (@mmasouddd)


    Hello

    On the page of better messages, if we are not signed in, a login form appears. I have another login form for non logged in users. But the better messages login form locked this page with its form and my form disappeared. How can I disable better messages login form

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author wordplus

    (@wordplus)

    Hi there!

    You can only redirect unlogged users the users from the messages page to your login page. This is example of code how to do it:

    add_action( 'template_redirect', 'my_redirect_if_user_not_logged_in' );
    
    function my_redirect_if_user_not_logged_in(){
        $page_id = 8437; // Messages page ID
        if ( ! is_user_logged_in() && is_page($page_id) ) {
    
            $link = add_query_arg('redirect', urlencode(get_permalink($page_id)), 'https://youwebsite.com/login/');
            wp_redirect( $link );
            exit;
        }
    }
    Thread Starter mmasouddd

    (@mmasouddd)

    Thank you for your fast answer

    The best support

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘disable login form’ is closed to new replies.