Home › Forums › Ticket Products › Eventbrite Tickets › How do I add the event date to the URL structure?
- This topic has 3 replies, 4 voices, and was last updated 7 years, 3 months ago by Kenny.
-
AuthorPosts
-
December 5, 2016 at 4:53 pm #1201811KennyParticipant
Hi, there!
My client hosts 4-5 events repeatedly throughout the year. They aren’t on a particular schedule (i.e. every 3rd Thursday).
The URL that is generated follows the standard “event/event-name/” format, but that can cause problems when the “event name” is the exact same.
Is there some way to make the URL automatically grab the event’s date and add that to the URL like a blog post’s publish date? (e.g. /event/MM-DD-YYY/event-name/” or something like that)
Thank you!
December 6, 2016 at 9:40 am #1202173CliffMemberHi, Kenny.
Thanks for your question.
The “/event/MM-DD-YYYY/event-name/” format would probably be problematic if you later activate our PRO add-on because of how it changes the link for recurring events. Here are some examples from our demo site:
- http://wpshindig.com/event/codeforcuritiba-hack-night/all/
- http://wpshindig.com/event/codeforcuritiba-hack-night/2016-12-07/
I think a better way to accomplish your end goal might be to programatically change the full slug, to something like this: “/event/event-name-YYYY-MM-DD/” (or another format)
It likely wouldn’t be super difficult to hook into save_post_tribe_events (see the Codex) and update the slug with that event’s date.
However, if your event changes its date, then people who bookmark the URL may hit a 404.
If you need some coding help, you may want to ask your developer or reference our documentation and list of known customizers.
December 28, 2016 at 8:35 am #1211055Support 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 ‘How do I add the event date to the URL structure?’ is closed to new replies.