I have a php file named 'profile.php' which handles the profile page of a user. Currently the profile url will be like "www.sitename.com/profile/?username=name". I want to make the profile link like "www.sitename.com/profile/name". How can it be done?

1 Answer 1


Is your profile.php is a file inside your theme. If so it's need to be a page template. Then you need to add query vars and add rewrite rule for that query vars . please read this blog http://www.rlmseo.com/blog/passing-get-query-string-parameters-in-wordpress-url/ for reference

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.