Custom Upload Panel in Menu Bar

I’d like to add a second custom WordPress image uploader to the WP admin panel sidebar that will upload images to a specific directory. To be more specific I am designing a custom theme for a client and I have set up a custom Nivo Slider with a custom PHP function in the #slider div that pulls all images from a certain directory i.e. /wp-content/themes/my-theme/images/slider and displays them in the Nivo slider. How would I create a panel in the admin panel menu bar that would allow my client to upload new images to /wp-content/themes/my-theme/images/slider?

Thanks y’all!

Read More

JWinton

Related posts

Leave a Reply

1 comment

  1. I think it’s not necessary to use a theme folder to hold some slider pictures.

    You can use a post or a page to be the “gallery holder” (it can even be left as draft), and pull its image attachments like this:

    function getSimpleGal($id){
    
        $results = get_children( array(
            'post_parent' => $id, 
            'post_status' => 'inherit', 
            'post_type' => 'attachment', 
            'post_mime_type' => 'image', 
            'order' => 'ASC', 
            'orderby' => 'menu_order ID') );
    
        foreach ( $results as $image ) {
    
            // instead of "full", use your custom image size
            $attachmentimage=wp_get_attachment_image_src( $image->ID, "full" );
    
            echo '<img src="'.$attachmentimage[0].'" title="'.$image->post_title.'" width="'.$attachmentimage[1].'" height="'.$attachmentimage[2].'" />';
    
        }
    }