跳到内容

COP PDF Attachment Menu

v0.1.1

Trevor Green · 2011年8月14日 上架

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

正在使用
40+
评分
5.0 / 5
累计下载
7,249
最近更新
2014年11月17日
2 条评价需要 WordPress 3.2.1+已测试到 4.0.38

贡献者

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.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums