Take a look at this answer and at to store the image as a custom field replace:
update_post_meta($new_post,'_thumbnail_id',$attach_id);
with what ever name you have for you custom field ex:
update_post_meta($new_post,'products_image',$attach_id);
Related Posts:
- Front-End Post Submission
- How to upload post thumbnail while wp_insert_post?
- Publish pending article from front end with a button?
- Get names of authors who have edited a post
- Edit a post from frontend. post_tags get saved, but not separated
- Developing a secure front end posting form
- How can I edit a post from the frontend?
- Developing a secure front end post editing form
- Post from front-end only by logged in users, form posts as “posted by:
- upload featured image from front end using wordpress add media button
- Post & edit a post from front end along with upload, dropdown, and other inputs
- Frontend Post Excerpt field mapping
- Frontend Post Form Validation
- Redirection not working in this front end post submission form?
- How to change the color theme per post?
- Adding an image to a non existing post
- How to make a bilingual front-end post using the plugin WP User Frontend and Polylang or qTranslate?
- Change Post Status From Front End
- 404 error on default post type and default taxonomy fronted page
- Lock post editing to one user at a time – wp_check_post_lock
- Replace image name on upload to the new post name on front-end form
- Edit the post title from the frontend
- Can i have more than one form for front end posting in one template [closed]
- Get Users Post ID
- WordPress wp_editor to post and edit
- How to limit post (Exception pages) for current user in each role in front end?
- Create posts by any logged in users
- How to generate an HTML link automatically from URL in a users’ post
- how let users select categories for posts in frontend?
- Allow reader to reorder posts for themselves (oldest first)
- Send the post id to a front end edit post form
- Post/Edit/Delete Post From Frontend… How?
- Send/Publish a Post front end
- How Can I Limit Users to Post Creation For My Frontend Theme?
- User driven content problems
- Create post from form with image
- Stop Authors from submitting spam post
- Stop WP from creating “Sample Page” and “Hello World!” post
- How to Create Editable Blocks of Text for the Homepage?
- Count how many posts in category
- Custom Single Post By Category
- Adding Post Counts to Menu (Nav) Programmatically?
- Show chart in post using data passed as custom field
- Show One Category on Post
- Show post titles only on the homepage
- how to grab first link in post… and of course call it
- Get all Youtube video’s from posts and embed them on a different page
- Send email to user that his post has been rejected
- How can I highlight syntax like it appears on stackoverflow?
- Add Category name to Post Title (h1)
- Blogroll – Different layout for first post
- How to delete old posts’ edits to save space?
- When trashing a post, also trash related comments
- Image Insert into posts and pages not working after 3.2.1 update
- Blog Posts not showing title
- Show info to author only
- Make Post Editor Select Number of Columns To 1 By Default
- Display post category in foreach loop with category link
- Adding the_date inside tags around the_content
- Mixing Tweets with Posts
- How to Link to all posts that have the Standard Post Format
- Problem with permalink routing?
- Whenever an author saves their post a \" is added next to the double quotation marks
- “edit_published_posts” and “edit_other_post” issue
- WordPress is replacing double minus signs in Post Title, how to disable it?
- using is_paged for hiding image on posts
- WordPress custom post type with folder structure in slug
- wpColorPicker – problem with implementation to post meta
- Post filtering is returning blank page
- Display the 2nd category name of a custom post type without error if its null?
- How to set a certain Custom Template to a Single Blog Post
- How to Featured content with images in home page?
- how to display today’s most viewed posts order by custom meta “views”
- Keyboard shortcut for headings on safari
- Highlighting Current Category in the Archive and Feeds page
- Optimal WP Web App Backend for mobile app development
- Change permalinks for posts & for custom post types
- How to customize blog post titles to render a YouTube logo on posts with an embedded video?
- Post page overwrite the custom blog page
- Updating post status via rest api
- unable to display two post per page in wordpress front-page.php
- WP Ajax returning 0, can’t find action
- Scheduled posts appear as clickable in the front end
- show image gallery in archives or category page
- Adding wordpress posts using phpmyadmin
- Colorbox not working on native WordPress gallery when gallery is loaded thru AJAX
- How can I get post text from all posts on a WordPress news site?
- Use special template for the first post in the loop
- Posting a comment redirects admin/users to blank page
- Expired Post with More Recent Time Stamp?
- Posts don’t appear on Template Page
- How to get only current images of a post
- Latest Posts not in the right order
- Howto put advertising as post number 1,2,3 etc
- How to Include a common category in a custom Category Search
- WordPress Admin Tables in Post View
- How do I insert a custom field in a user submitted post?
- Print out one of 2 post category [closed]
- How to get if category has posts?
- The WordPress wp_posts data table