Title: COP PDF Attachment Menu
Author: Trevor Green
Published: <strong>14 Agoosto, 2011</strong>
Last modified: 17 Nofeembar, 2014

---

Raadi kaabayaal

![](https://ps.w.org/cop-pdf-attachment-menu/assets/banner-772x250.jpg?rev=696310)

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://s.w.org/plugins/geopattern-icon/cop-pdf-attachment-menu_f3eb8c.svg)

# COP PDF Attachment Menu

 Qore [Trevor Green](https://profiles.wordpress.org/trevogre/)

[Soo Rog](https://downloads.wordpress.org/plugin/cop-pdf-attachment-menu.zip)

 * [Faahfaahin](https://so.wordpress.org/plugins/cop-pdf-attachment-menu/#description)
 * [Dibu-eegisyo](https://so.wordpress.org/plugins/cop-pdf-attachment-menu/#reviews)
 *  [Rakibaad](https://so.wordpress.org/plugins/cop-pdf-attachment-menu/#installation)
 * [Horumarinta](https://so.wordpress.org/plugins/cop-pdf-attachment-menu/#developers)

 [Taageero](https://wordpress.org/support/plugin/cop-pdf-attachment-menu/)

## Sharraxaad

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”]
 * Force download of the attachments
    - [pdfmenu dowload=”all”] (force download of all listed attachments)
    - [pdfmenu dowload=”application/pdf”] (force download of a single mime type)

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

## Rakibaad

Extract the zip file and just drop the contents in the wp-content/plugins/ directory
of your WordPress installation and then activate the Plugin from Plugins page.

## SBI

**How can I style the mime type classes that are now output?**

You will now see `<li class="application/pdf">` (or your selected mime type) in 
the code. But you can’t type the / in your stylesheet!

In order to refer to this style you need to change the / to \2f in your classname.

So it looks like

    ```
    .application\2fpdf { 

    }
    ```

That solution reduces that amount of code required to output the class and only 
sligthly increases the complexity of styling. It is the least code approach rather
than the most user-friendly approach. Which I think is better in this case.

More Questions Please.

[Questions / Donations](http://www.agreenweb.com/wordpress/cop-pdf-attachment-menu/cop-pdf-attachment-menu-donations/)

## Dibu-eegisyo

![](https://secure.gravatar.com/avatar/ce3d56a07745303bf98d216bf3459830e76a134b88ebb1b6df18c249b75646e2?
s=60&d=retro&r=g)

### 󠀁[Works Great](https://wordpress.org/support/topic/works-great-2406/)󠁿

 [Jessica J.](https://profiles.wordpress.org/jessicajjohnston/) 3 Sebteembar, 2016

Great plugin, works just as described. Allowed me to do a bit of extra custom coding
to display PDF files on a client website I manage. Looks great, and best of all,
it works flawlessly still, even after 2+ years it’s been installed on the website.
Thanks for sharing!

 [ Akhri dhammaan 2 dibu-eegis ](https://wordpress.org/support/plugin/cop-pdf-attachment-menu/reviews/)

## Ka-qaybgalayaasha & Horumariyayaasha

“COP PDF Attachment Menu” waa softiweer il furan. Dadka soo socda ayaa wax ku biiriyay
kaabahan.

Ka-qaybgalayaasha

 *   [ Trevor Green ](https://profiles.wordpress.org/trevogre/)

[Ku tarjun “COP PDF Attachment Menu” luqaddaada.](https://translate.wordpress.org/projects/wp-plugins/cop-pdf-attachment-menu)

### Ma xiisaynaysaa horumarinta?

[Baadh koodka](https://plugins.trac.wordpress.org/browser/cop-pdf-attachment-menu/),
fiiri [bakhaarka SVN](https://plugins.svn.wordpress.org/cop-pdf-attachment-menu/),
ama iska qor [diiwaanka horumarinta](https://plugins.trac.wordpress.org/log/cop-pdf-attachment-menu/)
adigoo adeegsanaya [RSS](https://plugins.trac.wordpress.org/log/cop-pdf-attachment-menu/?limit=100&mode=stop_on_copy&format=rss).

## Isbeddellada

#### 0.1.1

 * First WordPress 4.0 testing
 * Added the first version of paging to the shortcode and widget functionality so
   that you can set numberofposts and your attatchments will show page navigation
   within the page.
    - This should fix but not necessarily modify the previous default behavior as
      it appears that the previous version was output the page numbers but they 
      were not functioning.
    - Paging only works appropriately with a single instance of paging per page.
      Multiple instances will all navigate between pages together.
 * Added the [attachments], and [attachmentmenu] shortcode. I haven’t checked to
   see if [attachments] creates conflicts with other plugins. This has the same 
   functions but it defaults to listing all mime types rather than just pdf files.
   Use with caution, this may be renamed if I discover I’m overlapping with another
   plugin. [attachmentmenu] is more in line with future plans I have and will should
   be safer.
 * Cleaned up extract code from the shortcode.
 * Added a span of class=”sep” to the | in the paging so that it can be styled but
   still have a default appearance that is functional.

#### 0.1.0

 * Added download=”(mime type)” and download=”all” which converts links to forced
   download links. Allows other types (all types not tested).
 * Widget also allows you to set the mime type to force downloads
 * Thanks to [sallydeford](https://wordpress.org/support/profile/sallydeford) for
   suggesting forced download links as an option.

#### 0.0.9.8

 * Just updating things for the plugin page.

#### 0.0.9.7

 * IMPORTANT Change. The widget (not the shortcode) was showing all pdf files with
   the default settings instead of just the attachments to the current post. Should
   be working now.

#### 0.0.9.6

 * Fixed error with shortcode showing all types by default
 * Thanks to [sallydeford](https://wordpress.org/support/profile/sallydeford) for
   pointing out the issue.

#### 0.0.9.5

 * Added options to display captions and descriptions.
 * style captions with .the_caption
 * style description with .the_description

#### 0.0.9.4

 * Minor Fixes to new features. (Was defaulting in the widget to “all types”
 * Added localization functions.

#### 0.0.9.3

 * Added [pdfmenu all_types=’true’] to the shortcode.
 * Added and all types checkbox to the widget.
 * All items have thier mime type as a class (ex. class=”application/pdf”).

#### 0.0.9.2

 * Adding the mime type as a class to each list item ( ex. class=”application/pdf”).
   Would have added it to the container but I wanted to be able to later add the
   output and styling of attachments of multiple mime types in a single list.
 * Changed basic ownership details of the plugin to point to my current site [www.agreenweb.com](http://www.agreenweb.com/).

#### 0.0.8

 * Minor changes to the widget editor

#### 0.0.7

 * Added ordering options to the widget settings.

#### 0.0.6

#### Shortcode

Added orderby and order to the shortcode options for reordering.

#### defaults are:

 * orderby = “date”
 * order = “ASC”

#### In Progress

 * Started adding paging.

 * Add offset=”x” or paged=”x” with a numberposts=”(number)” that is not zero to
   the shortcode.
 * In order to get another set of links.
 * There is not yet any navigation.

#### Widget

Added an option to add a title.

Did some debugging.

#### 0.0.5

Added a check requiring php version 5.2.1 on install.
 Moved more code into classes.

#### 0.0.4

Added custom widget class. No change to function.

#### 0.0.3

Improved the widget options.

#### 0.0.2

Added basic widget that functions the same as the shortcode.

#### 0.0.1

Initial Version

## Meta

 *  Version **0.1.1**
 *  Last updated **12 sano kahor**
 *  Active installations **40+**
 *  WordPress version ** 3.2.1 ama ka sareeya **
 *  Tested up to **4.0.38**
 *  Language
 * [English (US)](https://wordpress.org/plugins/cop-pdf-attachment-menu/)
 * Tags
 * [attachments](https://so.wordpress.org/plugins/tags/attachments/)[list](https://so.wordpress.org/plugins/tags/list/)
   [menu](https://so.wordpress.org/plugins/tags/menu/)[pdf](https://so.wordpress.org/plugins/tags/pdf/)
   [widget](https://so.wordpress.org/plugins/tags/widget/)
 *  [Aragti Sare](https://so.wordpress.org/plugins/cop-pdf-attachment-menu/advanced/)

## Qiimeynta

 5 out of 5 stars.

 *  [  2 5-star reviews     ](https://wordpress.org/support/plugin/cop-pdf-attachment-menu/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/cop-pdf-attachment-menu/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/cop-pdf-attachment-menu/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/cop-pdf-attachment-menu/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/cop-pdf-attachment-menu/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/cop-pdf-attachment-menu/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/cop-pdf-attachment-menu/reviews/)

## Ka-qaybgalayaasha

 *   [ Trevor Green ](https://profiles.wordpress.org/trevogre/)

## Taageero

Ma heysaa waxaad dhahdo? Caawimaad ma u baahan tahay?

 [Eeg madasha taageerada](https://wordpress.org/support/plugin/cop-pdf-attachment-menu/)

## Ku deeq

Ma jeclaan lahayd inaad taageerto horumarinta kaabahan?

 [ Ugu deeq kaabahan ](http://www.agreenweb.com/wordpress/cop-pdf-attachment-menu/cop-pdf-attachment-menu-donations/)