I'm adding a query string on the edit CPT page so I can add different meta boxes depending on what type it is. We're doing profile types, and the choices are student, staff, alumni and external.

The url looks something like this:


profile_type=student is my custom bit.

I'm wondering if anyone knows whether this is a good or bad idea? I have it set up and working, but I keep finding edge cases where the edit page is loaded without appending the query string. Now I'm thinking is it better to start again with a more wordpress standards way of doing it, or keep trying to plug the holes in as I find them.

For example, the current problems are drafts don't work, and the edit post link in the admin bar doesn't pass the query sting through. I could hopefully just fix them, but I'm sure there will be many other sneaky cases where you can get onto the add / edit page without having my needed query string.


  • 2
    I am guessing that there is a better way than this. What are the "types"? How is that organized/created? Is it user meta, maybe? Or are they roles? What? – s_ha_dum May 28 '14 at 15:43
  • Oh the profile types are a custom taxonomy, like categories. I've hidden them so the users can't select it, they can only click 'add new student' or 'add new staff', which adds a 'profile' custom post type and preselects the right category. But yeah you're right there must be a better way. – danbrown May 28 '14 at 21:29

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.