WordPress.org

Ready to get started?Download WordPress

Plugin Directory

COP PDF Attachment Menu

Adds a shortcode [pdfmenu] that defaults to displaying an unordered list of all pdf's attached to the current page or post.

Adds a shortcode [pdfmenu] and a widget that defaults to displaying an unordered list of all pdf's attached to the current page or post.

There are options for both altering the query to return a different set of attachments and for formatting the output.

This plugin should always default to:

<ul class="cop_pdfmenu">
    <li class="attachment/pdf"><a href="(direct uri to attachment)" target="_blank" title="(attachment title)">(attachment title)</a>
</ul>

The attachments will be ordered by date in the ascending order by default.

Shortcode Options include:

  • Change list types ol, li, div (nested divs).
    • [pdfmenu list_type="ul"]
    • [pdfmenu list_type="ol"]
    • [pdfmenu list_type="div"]
  • Set a different class on the container.
    • [pdfmenu class="differentclass"]
  • Set a different target.
    • [pdfmenu target="differenttarget"]
  • Get a list of pdfs from a different parent.
    • [pdfmenu post_parent="1"]
  • Change the number of pdfs to return. (currently no paging).
    • [pdfmenu numberposts="-1"] (returns all attachments)
  • Change the post_mime_type to query for a different type or multiple types.
    • [pdfmenu post_mime_type="application/zip"]

Widget Options include all of the shortcode options and add some selectors for altering the query and output.

Requires: 3.2.1 or higher
Compatible up to: 3.5.2
Last Updated: 2013-4-23
Downloads: 3,476

Ratings

5 stars
5 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

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

100,1,1
100,1,1