WordPress.org

Ready to get started?Download WordPress

Forums

Subordinate Post Type Helpers
[resolved] making subordinate to post / make post types detectable by o (8 posts)

  1. Brian Cruikshank
    Member
    Posted 1 year ago #

    Hello, is there a way to get this to work with the following?
    register_sub_post_type('mediahit',$args,'post');

    It seems I can't make a post type a subordinate to post.

    Also when registering post types through register_sub_post_type, they aren't detectable by plugins like Advanced Custom Fields. It would be awesome if we could use ACF to add fields to both the subordinate and superordinate type.

    Please let me know what you think.

    Thanks!
    Brian

    http://wordpress.org/extend/plugins/subordinate-post-type-helpers/

  2. randyhoyt
    Member
    Plugin Author

    Posted 1 year ago #

    I'm not sure why it wouldn't work with posts, but I'll take a look. I have opened a bug for this on Github: Use 'post' as parent post type.

    As far as Advanced Custom Fields, my plugin calls register_post_type() like normal for the subordinate post type. It should be detectable by ACF. However, ACF won't add custom fields to the subordinate post type lightbox that you launch from the parent post type edit screen: is that what you mean? I have opened an enhancement request on Github: Allow ACF in subordinate post type lightbox. (Please reply if that's not the issue.)

  3. Brian Cruikshank
    Member
    Posted 1 year ago #

    Thanks for the response! Definitely can't get it to work with 'post' as parent.

    I figured out why ACF wasn't detecting the post types: I copied the example code for groups and meetings and they had "'public' -> false" as an argument. Setting them to true made them show up in ACF.

    So yes, the question now is whether we can get ACF fields to show up in the subordinate post type lightbox. That would be so awesome and so much easier than coding fields by hand.

    Another small bug I noticed was setting the subordinate post type's argument to "'show_in_menu' => false" resulted in it still showing in the menu (albeit subordinate). It should probably be hidden.

    This plugin has huge potential. Thanks for thinking of it!
    Brian

  4. randyhoyt
    Member
    Plugin Author

    Posted 1 year ago #

    @Brian, I have fixed the plugin so that 'post' can now be specified as the parent post type.

  5. randyhoyt
    Member
    Plugin Author

    Posted 1 year ago #

    Also, I opened a new issue for the 'show_in_menu' item. Track it here.

  6. randyhoyt
    Member
    Plugin Author

    Posted 1 year ago #

    @Brian Cruikshank, I have released 0.2 to address the 'show_in_menu' issue. Good find!

  7. Brian Cruikshank
    Member
    Posted 1 year ago #

    Thanks Randy!

    I think there is something amiss with the version numbering.

    The plugin page says:

    Download Version %VERSION_NUMBER%

  8. randyhoyt
    Member
    Plugin Author

    Posted 1 year ago #

    Good catch! I'm working on an automated deploy script to push code from Github to Subversion over here, and I outsmarted myself. :~) The version number says 0.2 now. Thanks for your help!

    (If you upgraded to version %VERSION_NUMBER%, you may have to upgrade manually to 0.2. I'm not exactly sure how WordPress will handle versions that aren't numbers.)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags