Tag Info

New answers tagged


All of the code in your question can be replaced with: require_once( ABSPATH . 'wp-admin/includes/image.php' ); require_once( ABSPATH . 'wp-admin/includes/file.php' ); require_once( ABSPATH . 'wp-admin/includes/media.php' ); if ( $_FILES ) { foreach ($_FILES as $file => $array) { $image_post_id = media_handler_upload( $file ); if ( is_wp_error( ...


Autosave is in your way. How to properly turn off REVISIONS and AUTOSAVE for whole site and optionally for a custom post type only (I would have simply left a comment but I lack the cred.)


The easiest - in my mind - way to achieve this, is to make use of PHP: Sessions, so the $_SESSION global or some thing like »WP Session Manager«. When using sessions you can just add your post data to the session variable before redirecting and have the data available after the redirect.

Top 50 recent answers are included