WordPress.org

Ready to get started?Download WordPress

Forums

Portfolio Slideshow
[resolved] CPT support? (3 posts)

  1. aljuk
    Member
    Posted 1 year ago #

    The new upload panel is great, but how can I include it in a custom edit page for a custom post type?

    Also from the readme: 'The main gallery uploader no longer allows you to sort images attached to a post.' Seems not to be the case, it's working fine for me.

    http://wordpress.org/extend/plugins/portfolio-slideshow/

  2. Dalton
    Member
    Plugin Contributor

    Posted 1 year ago #

    Hi Aljuk,
    The WP authors changed the functionality of the gallery uploader in 3.5 at the last minute. For a while there it was impossible to sort images attached to a page. The new metabox is less necessary now that they've added that back in, but it may still be useful.

    To add the uploader panel to a CPT, you will need to add something to your theme's functions.php. I think this might work - although I haven't tested it:

    add_action( 'add_meta_boxes', 'your_custom_add_custom_box' );
    
    	function your_custom_add_custom_box() {
    		add_meta_box('ps_custom_post_type_uploads', __('Portfolio Slideshow', 'port_slide'), 'ps_custom_post_type_uploads', 'your_cpt', 'normal', 'default');
    	}

    Just replace "your_cpt" with your custom post type, I think that should do it!

    Dalton

  3. aljuk
    Member
    Posted 1 year ago #

    Awesome, thanks. I'll check this out today.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.