How do I add the event date to the URL structure?

Home Forums Ticket Products Eventbrite Tickets How do I add the event date to the URL structure?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1201811
    Kenny
    Participant

    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!

    #1202173
    Cliff
    Member

    Hi, 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:

    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.

    #1211055
    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 3 posts - 1 through 3 (of 3 total)
  • The topic ‘How do I add the event date to the URL structure?’ is closed to new replies.