Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8309873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T19:15:24+00:00 2026-06-08T19:15:24+00:00

With WordPress, I’m using wp_editor to allow users to use the editor and media

  • 0

With WordPress, I’m using wp_editor to allow users to use the editor and media uploader. I’d like to avoid creating an auto-save of the post, but the problem is that attachments have no post_id to attach to until the post is saved.

I was wondering if there was a way to upload the media and then attach it to the new post after it has been saved.

Could I pass a temporary ID to the attachment to identify it when the post is saved? Or maybe grab the attachment ID after it’s been uploaded?

Ideas appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T19:15:26+00:00Added an answer on June 8, 2026 at 7:15 pm

    After much fussing, I came to the conclusion that the post ID upfront is necessary.

    I ended up doing what the WordPress Post Edit screen does. I used a little jQuery and Ajax to dynamically create an autosave once the user has typed in a post title.

    Once the autosave is done, it replaces the media upload iframe href with one containing the autosave post ID.

    So, there’s still a chance that there will be some abandoned post drafts, but at least it requires a little commitment by typing in the post title.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Wordpress not using direct linking for the download links (looks like enterprise software developer
Wordpress is using MyISAM storage engine. MyISAM does not support transactions. How wordpress is
Wordpress.com doesn't allow free members to upload or customize the theme, whereas in wordpress.org
WordPress 3.2.1 I'm creating separate page templates, however, there are some page templates that
Querying wordpress posts according to their tags can look like this (if I pieced
The WordPress database schema for Users is as follows: TABLE wp_users ID user_login user_pass
Using Wordpress, I need to generate an array of tags(terms) from posts in a
Has Wordpress a function or something like that?I need a way to check if
My wordpress theme comes with integrated Fancybox , you can see it in use
Wordpress uses friendly seo url without using htaccess. Can any explain this to me

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.