function my_custom_shortcode() { $shortcode = array( 'id' => 'my_custom_shortcode', // make this unique 'name' => 'My Custom', // name in modal drop down 'template' => 'posts', // name of the shortcode template 'template_location' => 'plugin-dir/my-templates', // path to template folder 'style' => 'my_shortcode_css', // registered style 'script' => 'my_shortcode_js', // registered script 'post_type' => 'post', // post type to attach shortcode 'description' => ' ', // displays above the shortcode fields box 'fields' => array( // the fields to show array( 'name' => 'Title', 'id' => 'title', 'description' => 'Title to display above CPTs', 'type' => 'text', ), array( 'name' => 'Amount', 'id' => 'amount', 'description' => 'How many posts to show?', 'type' => 'text', ), array( 'name' => 'Featured Image', 'description' => 'Would you like a featured image', 'id' => 'featured_image', 'type' => 'checkbox', ), array( 'name' => 'Taxonomy', 'id' => 'taxonomy', 'type' => 'multicheck', 'options' => array( 'none' => 'None', ) ), ), ); return $shortcode; }