Change file name on upload in Media Page
The best way of doing this might be to attach a custom field to each post to keep the increment {n}. Something to the effect of: $attach_inc = 1; if ( is_single() ) { if ( $attach_inc = get_post_meta( $post_id, ‘attachment_inc’, true ) ) { $attach_inc++; update_post_meta( $post_id, ‘attachment_inc’, $attach_inc ); } else { add_post_meta( … Read more