• Resolved Stefan

    (@stufu07)


    Is there a hidden minimum number of core features that a post type must have enabled, or is it a bug that I can’t disable “Editor” support if “Title” is the only remaining enabled core feature?

    When I try to save a post type with such settings, “Editor” support is automatically enabled again. As soon as I enable any other core feature, such as “Comments”, the “Editor” remains successfully disabled.

    So it seems that at least 2 core features have to be selected to remove the editor.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Thanks for the feedback!

    In fact, there is a bug at the moment that forces to have at least 2 supports options checked for a Post Type. This will be fixed in the upcoming patch.

    In the meantime, you can fix it by yourself using the following code in your functions.php file:

    // acfe 0.8.9.2: fix minimum 2 supports options
    // make sure to rename the hook name 'my-post-type' with your post type
    add_filter('register_my-post-type_post_type_args', 'my_post_type_args', 10, 2);
    function my_post_type_args($args, $post_type){
        
        // force only 1 support
        $args['supports'] = array('title');
        
        // return
        return $args;
        
    }

    Sorry for the inconvenience.

    Have a nice day!

    Regards.

    Thread Starter Stefan

    (@stufu07)

    Great, thanks a lot!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Post Types Module – Disabling core functions does not work as expected’ is closed to new replies.