• moxymore

    (@moxymore)


    Hi there,

    I wonder how to change the default url for both login and logout directly in wp-discuz. Like many users, I have a membership plugin, and wish to give them the ability to login with the available popup if they are not logged in (or at least redirect them to the login page). And regarding the logout url, it shouldn’t redirect to the default wordpress login, but to the home page.

    For sure, I can do it manually in my PHP files if I disable the users status display in wpdiscuz and replace it by some additional code before the

    <?php if (function_exists('comments_template')) {
    comments_template();
    } else { ... }

    but if there is another possibility i’ll be glad to know it. I’m using ARMember plugin, a new membership plugin which is very promising, but not supported for social integration in wp_discuz (https://codecanyon.net/item/armember-complete-wordpress-membership-system/17785056).

    Regards.

    • This topic was modified 8 years ago by moxymore.
Viewing 2 replies - 1 through 2 (of 2 total)
  • @up I want to change login URI too

    I’ve figured out how to do it.

    add_filter('loginout', function ($link) {
        if (!is_user_logged_in()) {
            $loginUri = get_permalink(get_option('woocommerce_myaccount_page_id'));
            $link = str_replace(wp_login_url(), $loginUri, $link);
        }
        return $link;
    });

    Just use other uri in $loginUri variable

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to change default login link generated by wp-discuz’ is closed to new replies.