Shortcode for registration if not logged in

This topic contains 3 replies, has 3 voices, and was last updated by  Stiofan O’Connor 4 years, 10 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #498501

    Spencer Culpin
    Expired Member
    Post count: 54

    Hi,

    I’ve used the following shortcode on my Add Listing page to replace the standard “You must login first” :
    [gd_add_listing show_login=”1″ login_msg=”Please use the links to login or register before adding your listing”]

    I’m also using the usersWP plugin

    If I click on the new Login link created with the above shortcode: it shows:
    https://mysite.com/login/?redirect_to=https://mysite.com/add-listing/?listing_type=gd_place
    Which is what I want so that after logging in the user is redirected to the correct Add Listing form.

    The Register link shows:
    https://mysite.com/register/
    It does not include the: ?redirect_to=https://mysite.com/add-listing/?listing_type=gd_place

    How do I change the shortcode to include the correct redirection after registration, the same as in the login link?

    Many thanks

    #498535

    Alex Rollin
    Moderator
    Post count: 27815

    Thanks for asking about that. I have flagged your topic for the developers.

    #498593

    Spencer Culpin
    Expired Member
    Post count: 54

    Thanks Alex

    #498662

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    The redirect thing for login is a built in WP feature, once you login it redirects you back, but with standard WP registration you are not logged in, so you can’t be redirected back.

    If you install https://wordpress.org/plugins/userswp/ you can set it to auto log you in on reg and redirect you back. We are also working on a lightbox login/registration for that which should be out soon which would mean a redirect is not required.

    Thanks,

    Stiofan

Viewing 4 posts - 1 through 4 (of 4 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket