I created this custom field:
[Material]
type = file
label = Please upload PDF
size = 30
relation = true
mediaLibrary = true
mediaPicker = true
mediaRemove = true
multipleButton = true
multiple = true
I want to be able to upload a PDF in the admin and display it in a post. I am echoing the attribute with the following code, and all it does is output a number 103. So I know I am doing something wrong here, but I'm still a novice PHP guy. I am also having a problem with the checkbox's and arrays. The output just prints "array".
<?php if(isset($attr['Material']) && !empty($attr['Material'])){
echo '<div class="instructor">',$attr['Material'], '</div>';
}?>
I should also note that I can not delete the file after it's already been uploaded unless I delete the file from the library, i.e. the mediaRemove button is not working properly.