I'm about to embark on creating a new WP that, at the core, will rely on a custom post type. I'm building this plugin for a client, but plan to make it flexible enough to release in the future. My client has a specific need for the plugin and I ultimately want it to be flexible enough to meet the needs of many users. As such, I plan to create an admin area where a user can enter the various args that would go into the register_post_type function. My thoughts in doing so are that the end user will be able to leverage the power of my plugin while also being able to preciously control the custom post type that the plugin generates. I like the idea of easily giving this control over to non-technical users; however, my concern is that I could invite a number of potential issues by doing so. For instance, imagine that a user uses the interface to name the custom post type "whirly-doos", but later thinks that's a dumb name and decides to call it "howdy-doos". This could potentially orphan their previous custom post types.

So...my questions are: is this a good way of going about building this plugin? How would you implement the plugin and maintain a nice balance between customization and stability?

Thanks in advance!

2 Answers 2


I would not give them control over the actual name of the post type. What if they rename it to revision or attachment? Big time site wreckage potential there.

I'd say stick with the more "trivial" things; basically, only those things that don't go into the database: labels, rewrite settings (although that could be potentially hazardous in the hands of an uneducated user), menu icon, menu position, exclude from search, and supports.

I think allowing GUI management of those things would give the user the most flexibility without compromising stability.

  • I like the idea of seriously considering what I would and wouldn't offer them control over. I really want a person who, for instance, must change 'has_archive' to 'true', to be able to do so, but perhaps that's not what I need to be doing. So far, I think I might hard code the internal name of the post-type. There is no need for that name to ever change. I would them give them control over the labels so the appearance can change. Great input John!
    – tollmanz
    Apr 29, 2011 at 2:21

I guess there are already some plugins out there that do stuff like you mentioned. Here's one example.

  • Thanks kaiser. I'm actually not looking to build a custom post type plugin. Rather, I'm building a plugin that does something very different; however, I plan to have a customizable custom post type that will be necessary for the rest of the plugin functionality.
    – tollmanz
    Apr 29, 2011 at 2:07
  • You are right John! I'm just interest in how others would approach the problem of offering customizability of the singular custom post type in my plugin while making sure that these changes don't cause issues with the performance of the plugin
    – tollmanz
    Apr 29, 2011 at 2:08
  • @Sardine Oops, I deleted my comment between your comments, since your first comment confirmed my supposition. Apr 29, 2011 at 2:10
  • @Sardine - in this case i'd suggest to inspect the linked plugin for filters and hooks and build a child plugin that allows locking of specific stuff based on if( current_user_can( 'capability' ) ).
    – kaiser
    Apr 29, 2011 at 2:13
  • @kaiser - thanks! That is a good idea. It would save me some time! The purist in me wants to re-invent the wheel though! I appreciate this suggestion and will consider going this route!
    – tollmanz
    Apr 29, 2011 at 2:18

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.