Title: Attachment Problem
Last modified: February 24, 2017

---

# Attachment Problem

 *  Resolved [emreguler](https://wordpress.org/support/users/emreguler/)
 * (@emreguler)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/attachment-problem-4/)
 * I created a custom upload field with WCK and select attach upload to post.
    but
   my uploads don’t attach to post so the codes in below not working.
 *     ```
       $attachment = get_children(array('post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image'));
       					if ($attachment) {
       ```
   
 * Note: An upload field that created before this field is still working. Please
   help…

Viewing 1 replies (of 1 total)

 *  Thread Starter [emreguler](https://wordpress.org/support/users/emreguler/)
 * (@emreguler)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/attachment-problem-4/#post-8843875)
 * I solved my problem. I use the code below instead of above…
 *     ```
       $my_meta = get_post_meta( $post->ID, 'MYMETASLUG', true );
       					if( !empty( $my_meta ) ){
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Attachment Problem’ is closed to new replies.

 * ![](https://ps.w.org/wck-custom-fields-and-custom-post-types-creator/assets/icon-
   256x256.png?rev=2257602)
 * [Custom Post Types and Custom Fields creator - WCK](https://wordpress.org/plugins/wck-custom-fields-and-custom-post-types-creator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wck-custom-fields-and-custom-post-types-creator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wck-custom-fields-and-custom-post-types-creator/)
 * [Active Topics](https://wordpress.org/support/plugin/wck-custom-fields-and-custom-post-types-creator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wck-custom-fields-and-custom-post-types-creator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wck-custom-fields-and-custom-post-types-creator/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [emreguler](https://wordpress.org/support/users/emreguler/)
 * Last activity: [9 years, 3 months ago](https://wordpress.org/support/topic/attachment-problem-4/#post-8843875)
 * Status: resolved