Dougal Campbell's geek ramblings

WordPress, web development, and world domination.

Documents Shortcode

Description

By adding a simple [documents] shortcode in your post or page, you get a
list of all documents (non-image/audio/video) attached. Each item in the
document list can be styled with CSS to indicate different document types
based on file extension (e.g., .doc, .pdf, etc).

Changelog

= 1.0.1=
* Allow CSS URL to be filtered.

1.0

  • Initial release. 2012-09-10

Examples

All attached media: [documents]

Just .pdf files: [documents ext="pdf"]

Just .pdf and .key: [documents ext="pdf,key"]

 

About Dougal Campbell

Dougal is a web developer, and a "Developer Emeritus" for the WordPress platform. When he's not coding PHP, Perl, CSS, JavaScript, or whatnot, he spends time with his wife, three children, a dog, and a cat in their Atlanta area home.
Bookmark the permalink.

4 Responses to Documents Shortcode

Leave a Reply

%d bloggers like this: