How To Add One Tag to Multiple Posts?

If you have the ability to use wp-cli on a bash-like shell it’s a handy way to do this: for ID in $(wp post list –post_type=post –post_status=any –field=ID); do wp post term add $ID post_tag old; done for ID in $(…); do starts a loop for each line of output of the internal command wp … Read more

How to bulk Edit Dates in Media Library?

You can use a plugin called Media Library Assistant. After you install it go to your Media > Assitant (wp-admin/upload.php?page=mla-menu). Select all the images or the ones you want to edit. Click on Bulk Actions. Click on Edit and then Apply. Then you will see Uploaded on and use the date you wish.

Bulk Image Uploader to create new post from each image [closed]

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; }

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)