Home › Forums › Ticket Products › Event Tickets Plus › Custom login url
- This topic has 3 replies, 2 voices, and was last updated 5 years, 12 months ago by dotsweb.
-
AuthorPosts
-
April 26, 2018 at 2:40 pm #1517368dotswebParticipant
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.
April 27, 2018 at 1:45 pm #1518192VictorKeymasterHi 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,
VictorApril 27, 2018 at 9:27 pm #1518321dotswebParticipantWhats the best and safest way to use it? Should I sent it in the string param in the code?
April 30, 2018 at 6:39 am #1519128VictorKeymasterHi 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,
VictorMay 22, 2018 at 9:35 am #1536145Support DroidKeymasterHey 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 -
AuthorPosts
- The topic ‘Custom login url’ is closed to new replies.