Plugin Directory

Test out the new Plugin Directory and let us know what you think.
!This plugin hasn’t been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

WP Publication Archive

Allows users to upload, manage, search, and download publications, documents, and similar content (PDF, Power-Point, etc.).

How do I upload a new file?

Option 1: Use the built-in media uploader on the "Add Publication" screen.

Option 2: Upload a file to your server via FTP (or to a remote host like AWS) and place the full URL (including the http://) in the Publication field on the Edit Publication page.

How do I list my publications?

You can display a list of publications either by includeing the [wp-publication-archive] shortcode on a post/page or by placing in your theme template files. WordPress will render your publication list automatically.

Can I show publications in a dropdown rather than as a list?

Yes! Simply add showas="dropdown" as a parameter within the regular shortcode, and the plugin will use a dropdown template rather than a list template. For example:

[wp-publication-archive showas="dropdown" /]

Can I filter the list by category

Yes! Just include categories="cat1,cat2" in your shortcode where "cat1" and "cat2" are the names of the categories you want to display.

Can I filter the list by author?

Yes! Just include author="author-name" in your shortcode where "author-name" is the slug of the author you want to display.

What File Types are Available

By default, the plug-in contains icons for several common file types. The icons include:

  • Standard document files
  • Spreadsheet formats (i.e. Excel, Open Office Calc)
  • Video
  • Image
  • Audio
  • Adobe PDF
  • Zip

All other file types will feature a generic "file" icon.

Some of my files aren't downloading. What's wrong?

There could be any of a hundred causes for this. Most likely, your files are just too large to be handled by your server.

By default, both file opens and downloads are streamed to your server. This means the plugin will attempt to open the file (whether it's remote or locally-hosted) and will stream the contents of the file to the browser. This has the advantage of never exposing the raw download URL to the user.*

Unfortunately, it means your server has to download the file first before it can pass it along to the user. For smaller files, this isn't an issue. But for much larger files, connections can time out.

If you are serving large files, you can force the file open URL to forward connections rather than stream them. This means requests to your file open URL (i.e. http://site.com/publication/title/wppa_open) will receive a 303 "See Other" redirect pointing them to the original resource. It's less work for your server, but the end user will see the original URL.

Just add add_filter( 'wppa_mask_url', '__return_false' ); to your functions.php file to turn off URL masking and use the redirect method instead.

When you add this filter, the file download URL will behave the exact same way - redirecting requests to the original resource rather than streaming the file to the browser. Unfortunately, this leaves the exact behavior of the link up to the browser - some will attempt to download the file, some will open it instead.

  • A future version of the plugin will allow you to have password-protected downloads. Hiding the raw URL of a file is important for this feature to work.

How do I use the thumbnail feature?

Thumbnail support is extended through the plugin, but not actually implemented in any templates. You can upload a custom thumbnail for each Publication, and the URL will be stored in the Publication's meta field in the database under the wpa-upload_image key.

You can get the raw thumbnail URL by requesting it directly with get_post_meta(). Alternatively, the WP_Publication_Archive_Item class contains some useful helper methods for printing the thumbnail URL wrapped in proper HTML tags. You can use code similar to the following:

$pub = get_post( $publication_id );
$pub = new WP_Publication_Archive_Item( $pub->ID, $pub->post_title, $pub->post_date );

// Return the Publication thumbnail for use elsewhere
$thumb = $pub->get_the_thumbnail();

// Echo/print the thumbnail to the browser

These helper methods will generate HTML tags similar to:

<div class="publication_thumbnail">
    <img src="http://site.com/thumbnail.png" />

Also, the actual thumbnail URL printed will be passed through a filter. You can intercept this and do whatever you need to with the URL (add query arguments, switch http/https protocols, etc).

add_filter( 'wpa-upload_image', 'your_custom_function', 10, 2 );

The filter passes two arguments, the raw URL for the thumbnail and the ID of the publication.

Why are some files downloaded even though I clicked "open?"

The open behavior is 100% dependent on your browser. In some cases (i.e. PDFs) the file will open in the browser using a built-in viewer. In other cases (i.e. Zips) there is no in-browser viewer for that file type, so the browser will download the file instead.

The plugin makes every attempt possible to return the correct MIME type for each file so that the browser know what to do with it. But in some cases (i.e. Zips or unknown file types), the plugin will return a type of application/octet-stream which the browser sees as a generic file and just downloads to a generic, often extensonless, filename.

If you're coming up against a situation like this, I recommend you use the Download link instead.

Requires: 3.5 or higher
Compatible up to: 3.6.1
Last Updated: 4 years ago
Active Installs: 2,000+


3.6 out of 5 stars


Got something to say? Need help?


Not enough data

0 people say it works.
0 people say it's broken.

0,1,0 0,1,0
0,1,0 100,1,1 0,1,0 100,2,2
0,3,0 50,2,1
100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1