WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Using Custom Post Type

[Resolved] Using Custom Post Type

Viewing 6 replies - 1 through 6 (of 6 total)
  • martinjesus
    Member

    @martinjesus

    Hi there,

    I will be also interested in this functionality!

    Anyone knows how to implement it?

    Thanks in advance!

    Jesús

    Pancho Perez
    Member

    @lonchbox

    @martinjesus I it works, don´t need anything.

    Now I´m wondering if I can remove the video metabox from normal post and just keep it in selected Custom Post Types.

    Hi,

    I found a way, is not part of the plugin but is a hack inside the theme to remove the Featured Video Metabox for specific CPTs using add_meta_boxes action.

    use this code:

    /*Remove metaboxs from CPTs*/
    add_action( 'add_meta_boxes', 'custom_remove_meta_boxes' );
    function custom_remove_meta_boxes() {
        /* MY_CPT */
        remove_meta_box( 'featured_video_plus-box', 'MY_CPT', 'side' );
        /* page */
        remove_meta_box( 'featured_video_plus-box', 'page', 'side' );
        /* post */
        remove_meta_box( 'featured_video_plus-box', 'post', 'side' );
    }

    Hope it helps.

    Plugin Author Alex
    Participant

    @ahoereth

    Will consider this for a future version. Have to look into which settings are actually required because they already got quite bloated.. Is this resolved for the moment?

    yes, that hack resolve my needs.

    Maybe you can add this settings in the settings -> writing to choos the CPTs to use the featured videp plus box.

    Thanx in advance.

    Ruzgar Dogu
    Member

    @ruzgar-dogu

    @lonchbox

    I tried your code, and succeeded in removing meta boxes on both pages and posts.

    /*Add or Remove metaboxs from Custom Post Types*/
    add_action( 'add_meta_boxes', 'custom_remove_meta_boxes' );
    function custom_remove_meta_boxes() {
        /* Remove Featured Image / PORTFOLIO */
        remove_meta_box( 'featured_video_plus-box', 'post', 'side' );
    }
    function add_meta_boxes() {
        /* Add FVP to PORTFOLIO */
        add_meta_box( 'featured_video_plus-box', 'portfolio', 'side' );
    }

    But unfortunately, FVP does not show up on “Portfolio” custom post type. Meaning, second part of the code

    function add_meta_boxes() {
        /* Add FVP to PORTFOLIO */
        add_meta_box( 'featured_video_plus-box', 'portfolio', 'side' );
    }

    does not work. Probably because the core functions does not recognize ‘featured_video_plus-box’ reference. Do you have any idea how to enable FVP on Custom Post Type.

    Sorry that i had to write here, i already started a new thread, but no replies since.

    Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] Using Custom Post Type’ is closed to new replies.