• Dear Friends,

    After I added the following codes in a code snippet, I couldn’t login to the wordpress admin page of my site. It redirects me to the /my-account/ front-end page.
    How can I delete the snippet? I cannot login the admin panel (wp-login.php). I am frustrated.

    add_action(  'login_init', 'user_registration_login_init'  );
    function user_registration_login_init () {
         if( ! is_user_logged_in() ) {
            wp_redirect( '/my-account' );
            exit;
          }
    }

    Thanks & regards,
    KF

    • This topic was modified 3 years, 7 months ago by kungfuclass.
Viewing 3 replies - 1 through 3 (of 3 total)
  • You can access your server via SFTP or FTP with your hosting account’s, navigate to /wp-content/themes/fucntions.php download this file, remove your ‘snippet’ code and upload again.

    Thread Starter kungfuclass

    (@kungfuclass)

    Thank you

    Anonymous User 17160716

    (@anonymized-17160716)

    Nakeman,

    After I added the following codes in a code snippet, I couldn’t login to the wordpress admin page of my site.

    After I added the following codes in a code snippet

    After I added the following codes

    ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘I cannot open the admin panel’ is closed to new replies.