1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

how can i bulk upload images & make a post from each image on wordpress?

Discussion in 'Blogging' started by vibebeatz, Aug 24, 2012.

Tags:
  1. vibebeatz

    vibebeatz Registered Member

    Joined:
    Aug 3, 2011
    Messages:
    86
    Likes Received:
    15
    im having a really hard time trying to upload multiple images and make a post for each one i had search for days now and can't seem to find a pluging that will do this does anyone know of one or how could i mass upload images and automaticly create a post for each image? i would really appreciate any help thanks.
     
  2. Nuker

    Nuker Regular Member

    Joined:
    Jan 21, 2011
    Messages:
    352
    Likes Received:
    32
    explain more
    i think i can be helpful
     
  3. vibebeatz

    vibebeatz Registered Member

    Joined:
    Aug 3, 2011
    Messages:
    86
    Likes Received:
    15
    Ok so igot alot of pics i want to upload them all on bulk, but i want each pic upload to automatically make a post. so for evey pic uploaded is one post. i have over 1000 pics so to make a post and put a pic on each post manually one by one is a pain in the butt. Does that help? or what else you want me to explain?
     
  4. ryan-isra

    ryan-isra Junior Member

    Joined:
    Oct 20, 2009
    Messages:
    165
    Likes Received:
    21
    Home Page:
    Each image will have its own post (attachment post type). You can upload it in bulk in 1 post and just let it be (you may insert gallery) in that post. From 1 post, it will be linked to each attachment post.

    Otherwise, you may find a way to convert attachment post to standard post (via SQL or plugin)
     
  5. Njticket1

    Njticket1 Newbie

    Joined:
    Aug 24, 2012
    Messages:
    8
    Likes Received:
    0
    Nice post even i was also searching for that facts.
     
  6. vibebeatz

    vibebeatz Registered Member

    Joined:
    Aug 3, 2011
    Messages:
    86
    Likes Received:
    15
    i already kinda found what i was looking for thanks anyways everyone.
     
  7. flipflop101

    flipflop101 Junior Member

    Joined:
    Dec 2, 2008
    Messages:
    146
    Likes Received:
    17
    SOOOOOOOO annoying when people do this!

    And the solution was .....

    Would be polite and all.
     
  8. hits79

    hits79 Regular Member

    Joined:
    Feb 11, 2011
    Messages:
    269
    Likes Received:
    114
    Occupation:
    HP Customer Engineer
    Location:
    New Jersey

    100% agree with you!
     
  9. Nayer

    Nayer Newbie

    Joined:
    Jul 29, 2011
    Messages:
    11
    Likes Received:
    6
    For people looking for an answer.
    Code:
    add_action('add_attachment', 'create_post');
    function create_post( $attach_ID ) {
    
        $attachment = get_post( $attach_ID );
    
        $my_post_data = array(
                    'post_title' => $attachment->post_title,
                    'post_type' => 'post',
                    'post_category' => array('0'),
                    'post_status' => 'publish'
        );
        $post_id = wp_insert_post( $my_post_data );
    
        // attach media to post
        wp_update_post( array(
            'ID' => $attach_ID,
            'post_parent' => $post_id,
        ) );
    
        set_post_thumbnail( $post_id, $attach_ID );
    
        return $attach_ID;
    }
    
    
    
     
  10. ibmjango

    ibmjango Jr. VIP Jr. VIP

    Joined:
    Jul 3, 2010
    Messages:
    252
    Likes Received:
    74
    nayer could you please share how to use this code ?
     
  11. SnowWar

    SnowWar Power Member

    Joined:
    Mar 3, 2012
    Messages:
    595
    Likes Received:
    48
    Occupation:
    Pure student :p
    Multiple images uploading may not be supported as only one be done at a time.only one file is to be used and it creates 5 files on my machine. Or you can do Manually upload the image using ftp then open the uploaded image in browser and In worpress post, "Add an Image" box > "From URL" tab > give copied URL, title and alternate text and select insert into post. Good Day.
     
  12. Nayer

    Nayer Newbie

    Joined:
    Jul 29, 2011
    Messages:
    11
    Likes Received:
    6
    put it in functions.php
     
  13. gsmdna.com

    gsmdna.com Registered Member

    Joined:
    Feb 9, 2010
    Messages:
    78
    Likes Received:
    11
    Location:
    :: World ::
    Home Page:
    Where to place this piece of code?
    I have put it in the end of functions.php, but then I get error. Site gets blank with an error line.

    Still finding a solution for the same problem as thread starter. Any help is appreciated.
     
  14. ch8878

    ch8878 Elite Member

    Joined:
    Mar 21, 2009
    Messages:
    2,242
    Likes Received:
    428
    Gender:
    Male
    Occupation:
    Gamer
    Location:
    Youtube
    Home Page:
    Can you share the solution ?