This topic contains 2 replies, has 2 voices, and was last updated by  bicho44 4 years, 2 months ago.

  • Author
  • #4067


    Hi again, i have a cpt defined, with the hide metabox set to hide the feature image box because iam using the piklist version, but i cant make it work, any pointer will be nice 😀

    function barcos_post_type($post_types)
        $post_types['barcos'] = array(
            'labels' => piklist('post_type_labels', 'Barco')
            ,'title' => __('Ingrese un nuevo Barco', 'imgd')
            ,'public' => true
            ,'capability_type' => 'page'
            ,'menu_icon' => plugins_url('piklist/parts/img/piklist-icon.png')
            ,'page_icon' => plugins_url('piklist/parts/img/piklist-page-icon-32.png')
            ,'rewrite' => array(
                'slug' => 'barco'
        ,'supports' => array(
                'thumbnail' //I need this to use it with helpers,
        ,'hide_meta_box' => array(
                /* here the Feature images */
                ,'Featured Image'
                /* end the Feature images */
        return $post_types;
  • #4068


    @bicho44– This is definitely a bug. You’re going to need to do this old school:

    function my_remove_postimagediv()
      remove_meta_box('postimagediv', 'barcos', 'side'); 
    add_action('do_meta_boxes', 'my_remove_postimagediv');

    More info at the WordPress codex.

  • #4073


    Hi Steve:

    Thanks for the info. But…

    If we call the hide_meta_boxto the div postimagediv like this

    ,'hide_meta_box' => array(
                /* here the Feature image div */

    Works OK and the metabox is hidden

    So, the bug to resolve is maybe Piklist must have an ‘alias’ (?) to that div, maybe, ‘featureimage’ (i like that)

    Also a note in the docs will be a nice addition 😀

    Thanks in advance

You must be logged in to reply to this topic.