single post with meta
In my search for a way to : a) easily generate a list of a large number of PDF documents in a folder on the server; b) automatically show links to each document for easy download, and of course c) display this within a WordPress Page or Post (whew!), I discovered the WP Include File plugin from AmberPanther.com and this directory lister script (thanks to www.totallyphp.co.uk).
With a bit of experimentation, I was able to do it like this :
[ include file="MyCustomFile.php" masterpath="/home/myusername/myrootdirectory/thefilefoldername" ]
The hardest part was figuring out the proper path for the shortcode and adding hooks/html to index.php to style the list of PDFs. WP Include File has several settings options, but I ended up using what they call the “masterpath” option directly in the shortcode (as shown above). You can download my adapted version of the script here and see how I did it, and view a page with a list of PDF documents generated using the script (it could be other types of documents or images, too).
Fermitas Utilitas Venustas Solide, utile, beau. Solid, useful, beautiful. ©1994-2016 Dana Whittle