I have a bunch of PDF files in my Media Library and I want to show the relevant ones on a per-page basis in the sidebar. So on the 'About Cats' page, I want ILoveCats.pdf and cat-food.pdf from the Media Library to show up in the sidebar, but not dogsAreGreat.pdf. What would be the best way to do this? I'm using the Genesis framework if that helps. I would like for there to be an explicit connection between a file in the Media Library and the page(s) on which it shows up, so I'd prefer not to have just some hard-coded links in a template file with PHP testing is_page('blah').
Tell me more
×
WordPress Answers is a question and answer site for
WordPress developers and administrators. It's 100% free, no registration required.
|
|
|||||||||
|
|
Using the Download Monitor plugin allows me to categorize files, so I put my files in there instead of the Media Library. I organize files into categories based on which pages I want to display them. Then, I use a text widget with a custom shortcode to display files per category per page. In my theme's functions.php:
In a text widget in my sidebar:
|
|||
|
|