0

I have an url like: http://domain.com/event/?filter_location=77&location=name_of_location

I want a clean url like http://domain.com/event/name_of_location/77

How do I accomplish this in wordpress?

4
  • What is "event" here? What are the arguments in the query?
    – Rarst
    Commented Oct 10, 2017 at 11:40
  • event is a page listing custom post type events Commented Oct 10, 2017 at 11:41
  • @waterschaats So then use my method below... it will work if event is a category like I stated.
    – Ashtmdu
    Commented Oct 10, 2017 at 13:03
  • Event is a custom-post-type not a category and filter_location is the ID of another custom-post-type. It can't be done the way you explained Commented Oct 10, 2017 at 13:10

1 Answer 1

-1

You can customise the way your links are generated by going to the admin menu of WordPress then settings -> permalinks.

There will be multiple options to choose from or you may construct a 'custom' permalink structure to fit your needs.

So in your case, you may want to use the custom structure option and put something like %category%/%postname% if the event in your URL is a category.

3
  • Why is my answer downvoted? This is how you alter your urls in wordpess...
    – Ashtmdu
    Commented Oct 10, 2017 at 11:20
  • (not the downvoter) What you explained is how to set permalinks. What OP needs is redirects. filter_location and location are not part of permalink structure
    – kero
    Commented Oct 10, 2017 at 11:34
  • @kero Not by default no, but I'm sure they can be set up to use for that purpose.
    – Ashtmdu
    Commented Oct 10, 2017 at 11:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.