1
www.xyz.com/place?id=(variable)

which I would like in the format:

www.xyz.com/places/(variable)

www.xyz.com/tags?id=(variable)

which I would like in the format:

www.xyz.com/type/(variable)

www.xyz.com/things-to-do-in?id=(variable)

which I would like in the format:

www.xyz.com/things-to-do-in-(variable)

I tried

add_rewrite_rule(
    '^http://www.xyz.com/things-to-do-in-([^/]*)/?',
    'http://xyz.com/things-to-do-in?id=$matches[1]',
    'top'
);

but its not working. What should I do?

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.