Title: Post thumbnail in $_POST array?
Last modified: August 21, 2016

---

# Post thumbnail in $_POST array?

 *  [CroiSciento](https://wordpress.org/support/users/croisciento/)
 * (@croisciento)
 * [12 years ago](https://wordpress.org/support/topic/post-thumbnail-in-_post-array/)
 * Hello,
 * I’m making a basic php basket and i’m trying to retrieve different informations.
   So far so good I got the title, the content, the permalink everything is working
   at intended. But i’d like to save the_post_thumbnail in an input hidden like 
   this :
 * <input type=’hidden’ name=’thumbnail_image’ value=”<?php the_post_thumbnail();?
   >” />
 * The problem is that it returns me a number. But I’ve basically never done this
   in the past even with a basic image. So how should I proceed save this picture
   in my array?
 * Thanks for your help.

Viewing 1 replies (of 1 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [12 years ago](https://wordpress.org/support/topic/post-thumbnail-in-_post-array/#post-4984950)
 * `the_post_thumbnail()` outputs the HTML to display the thumbnail, it does not
   return anything meaningful. What is it you are actually trying to get, the thumbnail
   URL? That is returned by `wp_get_attachment_thumb_url()`, but if the call is 
   not in the “Loop”, you must provide the post ID as a parameter.

Viewing 1 replies (of 1 total)

The topic ‘Post thumbnail in $_POST array?’ is closed to new replies.

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 1 reply
 * 2 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/post-thumbnail-in-_post-array/#post-4984950)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
