Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter Charles Buchwald

    (@cbuchwald)

    Figured it out myself! I am using a custom post type with a custom field for file uploads, and I was trying to display the non-custom file thumbnail… which of course does not exist.
    Once I realized this, and used the proper (custom) field name, it displays just fine.

    Plugin Author Eliot Akira

    (@miyarakira)

    Ah, that’s good to hear it’s working. I’m curious, how are you generating thumbnails from .pdf? I guess the images are stored in another field?

    Thread Starter Charles Buchwald

    (@cbuchwald)

    Muddling my way through Advanced Custom Fields. I don’t actually have a thumbnail… just a link. But that will do for now.
    I figure since I only have about 5 file types, that later I can show a “generic” thumbnail for each type.

    Plugin Author Eliot Akira

    (@miyarakira)

    I see – I thought there was a way to generate thumbnails from documents somehow. I had a similar issue with how to display excerpts with thumbnail images when the posts contained only video. For that I found a plugin that automatically generates thumbnails from video, very handy.

    If I could ask… how did you get it to show up? I have a custom field file upload named “data_sheet” but `[content field=”data_sheet”] returns “Array” and nothing else…

    Plugin Author Eliot Akira

    (@miyarakira)

    Hello,

    Do you mean you would like a thumbnail for an uploaded file? Or, do you just want to display the file itself?

    It depends on how the custom field was created, if it returns a file URL, file object, etc. Looks like the plugin doesn’t know how to handle the field, so I can probably add a parameter to specify what you’d like the plugin to do with it.

    Actually, I’d be ok with the thumbnail, but what I’d really like to return is the file url.

    The custom field is made with Just Custom Fields.

    Apparently I can return either the url or the object.

    I think this is using non-standard custom fields, though. For most fields made with the plugin, standard wordpress custom field code works. Not sure about the file upload though. If you have another suggestion for creating the file upload field, I’m open to it.

    Here’s the function given for getting the image from the Just CF plugin upload field:

    just_custom_image( $post_id, $field_slug, [$args_single] );

    I made a change to using ACF for all this. I know this plugin already does well playing with ACF.

    Alright, so if you look at This you can see that [content field=”data_sheet”] is returning the attachment id, not the file, or url.

    It’s an acf file field, set to return url, and set to upload to post. I just can’t find anywhere in the docs how to display it properly.

    I did some reading on acf’s OWN shortcodes and made it work perfectly. No need for you to do anything here… idiot users like me just need to do our homework.

    Plugin Author Eliot Akira

    (@miyarakira)

    Sorry, this week has been very busy for me, and I couldn’t get to your question (and a couple others on the support forum here). Glad to hear you solved it, and I apologize I couldn’t be of help at the moment.

    ACF is great, I’m a big fan of the plugin. When I have time, I’ll look into how the file field made in ACF is displayed.

    No worries, man. Just knowing acf’s shortcodes work inside your loops is perfect!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Display other file thumbnails?’ is closed to new replies.