Register post type new_feature

Support MB Custom Post Type Register post type new_feature

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #48444
    Infolu OfficialInfolu Official
    Participant

    Hi everyone!
    I'm wondering if it's possible to manually add a custom support feature when registering a post type using the MB Custom Post Type extension from MetaBox.

    I know that when registering a post type directly in code, I can do something like:

    php
    Copiar
    Editar
    register_post_type('product', [
    'label' => 'Products',
    'public' => true,
    'supports' => ['title', 'editor', 'new_feature'],
    ]);
    However, in the MetaBox UI, I only see the default WordPress core support options (like title, editor, thumbnail, etc.).

    What I'm trying to do is find a way to add a field in the MB Custom Post Type interface where I can define the name of a custom support feature (e.g., new_feature), without having to build a separate plugin for it.

    The goal is for my post type to recognize and use that custom support just like it does when defined manually in PHP.

    Is that possible within the MetaBox UI, or would I need to hook into something to achieve it?

    #48453
    PeterPeter
    Moderator

    Hello,

    Thank you for reaching out.

    I'm afraid that there isn't an option or filter hook to add the custom support for the CPT in the UI. You can use the code to register the CPT and add the custom support to the settings.
    Please follow the documentation https://docs.metabox.io/extensions/mb-custom-post-type/#getting-php-code

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.