WordPress.org

Ready to get started?Download WordPress

Forums

WP 3.0 RC3 Adding to Custom Type menu, Custom admin panel (2 posts)

  1. Paul Menard
    Member
    Posted 4 years ago #

    I'm playing with the Custom Post Type abilities in WP 3.0 RC3. I'm building a prototype for a Real Estate Management system. I've had no problem setting up the new Post Type. If shows the new menu block for 'Property' with the Add New and Edit options. I also have defined some custom Taxonomies. Again these are added to the same menu block. no problem.

    But here is my problem. I want to add a new menu option to that same menu block. I can't seem to figure out how to hook into it. I know how to manually add menu blocks for plugins. But this block is created by WordPress.

    Also, for the new Post Type I don't want to use the default post editor form. I want to setup my own admin page. I know when I register the new post type I can set 'show_ui' to false. This will remove the entire menu bloc. I do want to built in support WP offers for displaying the post type listing. I just want to override the screen when the user decided to edit.

  2. goto10
    Member
    Posted 4 years ago #

    Hi pmenard,

    While perusing the codex, I spotted a snippet that appears to address your question about adding additional sub-menus to the pre-defined custom post type menu created by WP (see the last example within that anchor). I have not tested that code.

    As for changing up the edit custom post type edit page, I've been having decent results with using the existing page, but modifying the 'supports' params specified in register_post_type(), adding meta boxes, and enqueueing post type specific JS and CSS to tweak things further.

    Note that I have experienced several "gotchas" with manipulating the edit post page. For instance, removing the title creates some issues such as not being able to link into the post type from the edit post listing page (because the title is gone). You can manually create a new permalink for the post by manipulating the edit columns though. Also, removing the title removes the ability to change the permalink, which is pretty much a deal breaker for me, so I just leave it, and change the gray title prompt text using js to suit my needs.

    Also worth noting, removing the editor removes the media uploader buttons and the the "Insert into post" button (if you decided to manually invoke the media uploader). So I just hide the editor with css when I want to make use of the uploader, but have no need for the editor. (I've logged tickets requesting filters to address the title prompt text and Insert into Post issues).

    All and all, I've had a decent enough experience pushing around the existing edit custom post page, and have not had a need to do away with it all together, but you may still find it necessary for your needs.

    Here are some great resources for custom post types:
    http://kovshenin.com/archives/custom-post-types-in-wordpress-3-0/
    http://kovshenin.com/archives/extending-custom-post-types-in-wordpress-3-0/
    http://wefunction.com/2009/10/revisited-creating-custom-write-panels-in-wordpress/
    http://www.deluxeblogtips.com/2010/05/howto-meta-box-wordpress.html

Topic Closed

This topic has been closed to new replies.

About this Topic