LearnDash has brought in massive changes after version 3.0. One of the new features is login and registration popup.

It comes with a very nice login page, with a registration form. But some of the times we use a membership plugin or WooCommerce for the registrations. You would want to link to custom registration page in that case.

Thankfully LearnDash has brought in an easy code which you might use to replace the popup login url with a custom page.

If you have a child theme, you can add the code to functions.php file. Otherwise you will have to use code snippets plugin.

Here is the code you have to use.

add_filter(
    'learndash_login_model_register_url',
    function( $registration_url ) {
        // May add any custom logic using $registration_url.
        $registration_url="/subscriptions";
        // Always return $registration_url.
        return $registration_url;
    }
);

Make sure to replace “/subscriptions” with your own link. If you have a page www.yourdomain.com/memberships , your code would look something like this.

add_filter(
    'learndash_login_model_register_url',
    function( $registration_url ) {
        // May add any custom logic using $registration_url.
        $registration_url="/memberships";
        // Always return $registration_url.
        return $registration_url;
    }
);

I have kept this article to a few words but if you have any questions, do make sure to ask and I would be more than just pleased to answer them.

Similar Posts

Leave a Reply

Your email address will not be published.