Custom login url

Home Forums Ticket Products Event Tickets Plus Custom login url

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1517368
    dotsweb
    Participant

    Hi, how can I specify a custom login url so that when the user click on the “login” link right before purchasing a ticket that requires login, the user is forwarded to the custom login page instead of wp-login.

    #1518192
    Victor
    Keymaster

    Hi Sayuri!

    Thanks for getting in touch with us! I’d be happy to help you with that 🙂

    The tribe_tickets_ticket_login_url filter available provides an opportunity to modify the login URL used within frontend ticket forms.

    You can find this in the Event Tickets code > https://github.com/moderntribe/event-tickets/blob/master/src/Tribe/Tickets.php#L1902

    I hope that helps. Let me know if any follow up questions.

    Best,
    Victor

    #1518321
    dotsweb
    Participant

    Whats the best and safest way to use it? Should I sent it in the string param in the code?

    #1519128
    Victor
    Keymaster

    Hi Sayuri!

    Yes, the $login_url param is a string, so you should also return a string.

    It will depend on where your login page is located, but here’s a sample code for you to try:

    add_filter( 'tribe_tickets_ticket_login_url', 'custom_tribe_tickets_ticket_login_url' );
    function custom_tribe_tickets_ticket_login_url ( $login_url ) {
       // return the permalink to post id = 2
       $login_url = get_permalink( 2 );
       return $login_url;
    }
    

    You can place that into your theme’s functions.php file.

    Does it help?

    Best,
    Victor

    #1536145
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Custom login url’ is closed to new replies.