I am using Developer's Custom Field with custom post to set before-after images. Herewith listed my code. But when i select image and update the post. But, it is nat saving the uploaded images. And, displaying blank.
function register_my_custom_fields() {
slt_cf_register_box( array(
'type' => 'post',
'title' => 'Before After images',
'id' => 'before-after-images',
'context' => 'normal',
'priority' => 'high',
'fields' => array(
array(
'name' => 'before_image',
'label' => 'Before Image',
'type' => 'file',
'scope' => array( 'beforeafter' ),
'capabilities' => array( 'edit_posts' ),
'preview_size' => 'thumbnail',
'file_button_label' => 'Select Before Image',
),
array(
'name' => 'after_image',
'label' => 'After Image',
'type' => 'file',
'scope' => array( 'beforeafter' ),
'capabilities' => array( 'edit_posts' ),
'preview_size' => 'thumbnail',
'file_button_label' => 'Select After Image',
)
)
));
}
any solutions????
http://wordpress.org/extend/plugins/developers-custom-fields/