1

I want my permalink to be accessable via more than one slug. For example: example-page.com/contact/1234 or example-page.com/contact-1234

To explain my problem: My customer gets an email and he can participate at a quick survey. The email should contain a customized link that leads him to my wordpress site: example-page.com/contact-1234 The slug that's added to the permalink is the customer ID. So this should change. So the 1234 should be variable.

(The email is not generated, so I can add every link manually)

I want to know how I can change the URL to my customers ID's is there a snippet to use?

I hope I don't sound to confusing.

mEisn
  • 11
  • 1
  • 5
  • Do you want the destination pages to be different, or is the same page? – samiles May 11 '17 at 12:42
  • The destination page is the same - should be example-page.com/contact but displayed with different slugs example-page.com/contact/1234 – mEisn May 11 '17 at 12:47

1 Answers1

0

You may be able to do this through the Wordpress admin: How to Create Custom Permalinks in WordPress

Additionally this thread: How to Set POST permalink/slug in wordpress using wp_insert_post.

Community
  • 1
  • 1
nshiff
  • 192
  • 1
  • 2
  • 6
  • Thanks, the customer IDs should only show in this specific post - so I guess the first one is not an option. I don't think the second one will work too. I'm a noob at coding so I don't really understand it. Normally I just copy and paste ;) – mEisn May 11 '17 at 12:52
  • Gotcha. Yeah, there should be a relatively straightforward solution. I'm not sure if it's common enough to find a plugin or anything like that... for this page, you want the customer ID in the URL always? One thing to investigate would be using an HTTP parameter: http://example.com/123-slug?customerid=420. – nshiff May 11 '17 at 13:10
  • I want the customer ID to show on this specific page always :) yeah that sounds great - any code suggestions? – mEisn May 11 '17 at 14:26