Dougal Campbell's geek ramblings

WordPress, web development, and world domination.

Documents Shortcode

Description

  • Plugin link: Documents Shortcode
  • Plugin version: 1.0.1
  • Requires at least: WordPress 2.5
  • Tested up to: WordPress 3.4.2
  • Last updated: November 6, 2012
  • Rating: 5/5
  • Downloads: 2,873 Download ZIP

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

  1. Thanks Dougal. Just what I needed for an upcoming project with a lot of documents.

  2. Jen A says:

    Can you make the documents open in a new window?

  3. Is it possible sort documents ?

  4. tomhardychur says:

    Is it possible to select a specific document?
    Example: Set one document between after first textblock and a other after n textblocks later.

Leave a Reply

%d bloggers like this: