[wp-hackers] Adding field(s) before Title and post content on custom post type

Mike Schinkel mikeschinkel at newclarity.net
Fri Jul 16 01:24:07 UTC 2010


On Jul 15, 2010, at 9:06 PM, Paul wrote:

> It's been a while since I've needed to do this but I thought there was a hook that allowed displaying fields, meta box or raw above the Title. 
> 
> I'm working on a Custom Post Type system where the client may never enter post content for example. All the important information will be contained in a custom meta box. I know I can not support the title and/or editor when I register the post type. But I do still want these on the page. Just would like my specific meta box. Then the Title.  Then the editor. 
> 
> Looking at this another way I know I also have the option to not use the UI, again via the register post type call. But I do want all the listing pages. Just looking for more control over what is on the post admin page. /wp-admin/post.php

I have a very similar need.  AFAICT it's not possible to move the editor on the server end. Lox provided a nice jQuery solution[1] but I'd prefer not to use jQuery except when it's about interactivity that can't be done on the server and not when it's used to overcome the limitations of output from the current core code on the server. I've seen too many things can go wrong with jQuery solutions of this type.

It's disappointing that title and editor, if used, must be displayed first.  I have a project where the client wants me to display the content editor, with a heading, at the very bottom of the custom post edit screen.  It's also disappointing that the title is coupled with the permalink editor and that it cannot be moved elsewhere using server-side code.

I would definitely be up for adding flexibility in this area for 3.1.  For that matter I'd also like to see plugins be able to add new "supports" features for custom post types with a register_post_type_support() or similar.

-Mike
[1] http://farinspace.com/move-and-position-wordpress-visual-editor/




More information about the wp-hackers mailing list