• Resolved aceniz

    (@aceniz)


    So I installed the UM plugin and went thru letting it create the custom pages for account/login etc. I noticed that there was an issue with the theme (divi) so decided to alter each page to the theme so it fixed it. so going down the UM created pages went fine til I got to the logout page. It Logged me out! so I can’t edit the page.
    How do I prevent it from logging me out so I can edit the page to suit the theme layout correctly?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @aceniz

    You can try the following code snippet to disable the Logout function for Administrators:

    add_action("init","um_011022_disable_logout_for_admin");
    function um_011022_disable_logout_for_admin() {
        if( current_user_can('manage_options') && class_exists('UM') ) {
            remove_action( 'template_redirect', array( UM()->logout(), 'logout_page' ), 10000 );
        }
    }

    You can add the code to your theme/child-theme’s functions.php file or use the Code Snippet plugin to run the code.

    Regards,

    Thread Starter aceniz

    (@aceniz)

    Thanks. I’ve run that code in the functions.php of the theme (at the bottom of the list) and it wouldnt load the divi theme (spinning balls of death).
    I tried it using code snippets running in the admin area only and it still logged me out, tried running everywhere and same spinning balls.
    I’m not too sure where I would put it in the themes functions.php

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @aceniz

    Are you using an account that has manage_options capabilities? Are you using an Administrator account?

    Regards,

    Thread Starter aceniz

    (@aceniz)

    Yeh, theres only 2 accounts and they’re both admin. I think its the Divi theme that’s not loading the builder correctly when applying that code. The pages load using default editor but if trying to edit via Divi then I get spinning balls as if its loading

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @aceniz

    Did you mean you can view the Logout page with the code above? But when you edit it with the builder in the front-end, it just shows a spinning ball?

    Regards,

    Thread Starter aceniz

    (@aceniz)

    Yes I can view the page if using the WP block editor but not if using the Divi Visual builder.
    It also seems to happen on the password reset and the Register pages.
    The WP Block editor allows me to view the page and edit it (shows the Ultimate member shortcodes) but if I click use the divi builder it fails and wont load it. its almost as if the divi builder doesnt like the UM shortcodes

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @aceniz

    Could you please check if there’s any javascript error in the Browser console? Also, check if there’s any PHP error log generated related to the UM. You can ask your hosting provider to assist you with retrieving the PHP error log.

    Regards,

    Thread Starter aceniz

    (@aceniz)

    It seems that the error has been down to the webhost trying to get more money out of me. The site had been running fine for the last 2 months then all of a sudden it got sluggish and wouldnt respond. Their explanation and remedy was to turn off all of my plugins and blame it on that. I’d been running multiple pages perfectly fine until yesterday. then it went tits up.
    Their only option is to try and charge me more for a vps saying my site is using too much resources. apart from it working perfectly fine for the last 5 weeks.
    I’ll leave it there for now. I’ll try the code again and the steps you mention when they sort out their server.

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @aceniz

    Let us know when you’ve tested the code,

    Regards,

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @aceniz

    ..Please feel free to re-open this thread by changing the Topic Status to ‘Not Resolved’ if any other questions come up and we’d be happy to help. ??

    Regards,

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Cannot edit the logout page’ is closed to new replies.