• Hi there

    I’m trying to integrate WP adverts with ultimate members plugin. Users must create their account with ultimate member registration and not wp account create.

    What would be the best way to do this.

    On the manage ad page https://www.gotovine.com/adverts/manage/ I have redirected the login and registration links to ultimate member but on https://www.gotovine.com/adverts/add/ the create account and login should also be done via ultimate members plugin.

    I’ve been trying for hours now and can’t figure it out. Please help.

    The page I need help with: [log in to see the link]

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

    (@gwin)

    Hi,
    when pointing to a login or registration URL WPAdverts is using the default WP functions that is wp_login_url() and wp_registration_url().

    To change where the shortcodes link to you can use the functions filters, like this

    
    add_filter( 'register_url', 'my_register_url' );
    function my_register_url( $url ) {
        if( is_admin() ) {
            return $url;
        }
        return "https://link/to/your/registration/url/";
    }
    add_filter( 'login_url', 'my_login_url', 10, 2 );
    function my_login_url( $url, $redirect = null ) {
        if( is_admin() ) {
            return $url;
        }
        $r = "";
        if( $redirect ) {
            $r = "?redirect_to=".esc_attr($redirect);
        }
        return "https://link/to your/login/url/".$r;
    }
    

    The code you can add in your theme functions.php file or even better create a new WP plugin and paste it there.

    Just change in the code the https://link/to/your/registration/url/ and https://link/to your/login/url/ to actual links you would like to use.

    Thread Starter venessanolan

    (@venessanolan)

    Thanks so much Greg.

    Will try this and revert back.

    Much appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘WPAdverts and ultimate members’ is closed to new replies.