PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Downloadable file

  1. IA4W
    Member

    Hello,

    Can't seem to solve this or find a solution, sorry.

    I have a form set to upload an image and/or a PDF file. I need the image or file to show up as a thumbnail in the post, and in the case of it being a PDF, have the visitor be able to easily download the file.

    Seems like this shouldn't be to hard to do, but I can't figure it out. Right now the PDF file uploads ok to the WP admin area, but does not show up on the post.
    I'll really appreciate any quick help here!

    Thanks,
    Tom

    Posted 13 years ago on Sunday April 10, 2011 | Permalink
  2. Are you using a Post Custom Field setup as a File upload field type? That is the only way to upload a PDF and have it attributed to a post as a custom field. It's not going to be added to your Post Body automatically. It's going to be added as a custom field for that post and if your theme doesn't display that custom field, it's not going to get displayed.

    You could use the Content Template feature of the Post Body field. The Content Template allows you to control the Post Body just like you were using the Edit Post in WordPress where you can insert HTML, images, etc. You would enable the Content Template and then use the "Insert form field" drop down to insert field values into your Post Body, including Post Images, etc.

    Note: Anything that you put in the Content Template will be used to create the Post. It's a template for the content that will be used to create the post.

    Posted 13 years ago on Monday April 11, 2011 | Permalink
  3. IA4W
    Member

    I am trying to implement as you have suggested. All that seems to get inserted into the post is the URL to the PDF form. What might I be missing?

    Posted 13 years ago on Thursday April 14, 2011 | Permalink
  4. @IA4W I'm not sure what you mean? The URL to the PDF that was uploaded is what the field is going to output. If you want to display a thumbnail or icon instead, you need to update your content template and add HTML to display an image and wrap that image in the link to the PDF. It's not automatically going to show a thumbnail for your PDF. The merge code for that field is simply going to output the URL to the uploaded file. You need to customize it further to do what you want to do if you don't want it to show just a URL to the PDF form. You would wrap it in a link, output the URL in the HREF of the link, and then change the text. You'd have to use HTML in the content template.

    Posted 13 years ago on Thursday April 14, 2011 | Permalink
  5. IA4W
    Member

    Ok, thanks. I'll see if I can do it.

    Posted 13 years ago on Thursday April 14, 2011 | Permalink