0

I registered a custom post type for events and now I asked myself how to handle upcoming events and events in the past properly.

By now, I'm displaying upcoming events on a custom page template I assigned to a page and use the custom post type archive to display events that took place in the past.

My problem is that the custom post type archive now has the URL mysite.com/events which I would rather use for the upcoming events page and for the archive, I'd want to put something like mysite.com/event-archive or such.

It seems easier to reverse the method and modify the archive query in order to display future events on the custom post type archive and have mysite.com/events while creating a custom page template for past events and make it use the slug event-archive... But isn't that wrong?

  • How would you properly handle upcoming events and past events?
  • How do I modify the archive page URL?
  • Why would it be wrong? Are you familiar with the pre_get_posts action? – Milo Feb 5 '15 at 15:09
  • I don't know but it didn't quite feel right to put future events into an archive. Yes, I am familiar with the pre_get_posts action. I would use that to modify the archive query. – okiedokey Feb 5 '15 at 15:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.