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

vibebeatz

Registered Member
Joined
Aug 3, 2011
Messages
94
Reaction score
16
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.
 
explain more
i think i can be helpful

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?
 
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)
 
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)

Nice post even i was also searching for that facts.
 
i already kinda found what i was looking for thanks anyways everyone.
 
SOOOOOOOO annoying when people do this!

And the solution was .....

Would be polite and all.
 
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;
}
 
nayer could you please share how to use this code ?
 
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.
 
put it in functions.php

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.
 
Back
Top