Display title (and link) to a file in loop / excerpt
-
Hello,
I’m in search of a way to pull any files (other than images) that are added to a post and display the title as a direct link to it in my template file.
I want to avoid custom fields, because I won’t be the person making the posts.
Basically, if I attach a PDF to a post, I would like to add a link to that PDF below the excerpt in “posts” page. It would look something like this:
NEWEST POSTS
Post Title #1
Excerpt
File 1 File 2Post Title #2
Excerpt #2
File 3 File 4etc
I’m assuming something similar to what I’ve done with automatically grabbing the first image and displaying it as the thumbnail on the posts page. But in this case it would search for files by type and display the link to that file (if any)..instead of the thumbnail of a photo.
Thanks
Paul
- The topic ‘Display title (and link) to a file in loop / excerpt’ is closed to new replies.