I am trying to make a custom web app with wordpress. I have a page, Person with URL http://www.domainname.com/person. In that page, i have a shortcode. This shortcode is going to extract a get parameter from the URL such as http://www.domainname.com/person?id=5. The problem is that when clicking on URL like http://www.domainname.com/person?id=5, wordpress is complaining that the page does exist when the page http://www.domainname.com/person exist. How can I solve this ?
id is already used by WordPress, it's a query variable and a reserved name. If you put
?id=5 on the end of a URL, you're asking for the post with ID 5.
Instead, have you considered using a
person post type? This would give you an archive, add/edit screen, admin listings, templates, individual person templates, URL paths, etc all for free No need to create a page and a page template, just use