WordPress.org

Ready to get started?Download WordPress

Forums

Custom Field Template
Could not add more file after initial upload (1 post)

  1. willytjua
    Member
    Posted 1 year ago #

    Using CFT version 2.1.5

    customised the following custom field

    [File Upload]
    type = file
    multiple = true
    multipleButton = true
    relation = true

    what i realised is, when uploading file starting with 0 uploaded file (nothing), i can upload as usual without issue.

    but if i have already uploaded any number of files (for example i uploaded 2 files yesterday) and wanted to upload another 3 files today to the same CFT under the same post/page. the upload process work, files can be found under media library and the relation=true worked as well, i can find the file under "uploaded to this post" within the media library. However the files aren't showing up in edit page under the CFT field.

    and using the following code i could retrieve only the 2 images i uploaded to the CFT yesterday.

    <?php
                            foreach($images as $key=>$image) {
                                $attach_image_full = wp_get_attachment_image_src($image, 'full');
                                $attach_image_thumb = wp_get_attachment_image_src($image, 'thumbnail');
                        ?>
                               <div class="thumbnail">
    				                <a id="single_1" href="<?php echo $attach_image_full[0]; ?>" style="width:50px;height:50px; overflow:hidden;"><img src="<?php echo $attach_image_thumb[0]; ?>" style="width:50px;"/></a>
    				            </div>
                        <?php } ?>

    after testing with a few thing which doesn't work, i have to revert my version of CFT to 2.1 (i happend to set up a site using this version of CFT previously without issue), and everything worked without a problem.

    not sure if this is a bug or i did something wrong, just thought i should share.

    http://wordpress.org/extend/plugins/custom-field-template/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.