Plugin Directory


This plugin add a shortcode to display the list of attachments of a post, with icon and details. EG-Attachments is "TinyMCE integrated".

Automatic installation

1.Log into your WordPress admin 2.Click Plugins 3.Click Add New 4.Search for EG-Attachments 5.Click Install Now under "EG-Attachments" 6.Activate the plugin

Manual installation:

1.Download the plugin 2.Extract the contents of the zip file 3.Upload the contents of the zip file to the wp-content/plugins/ folder of your WordPress installation 4.Then activate the Plugin from Plugins page

The plugin is now ready to be used. You can also install the plugin directly from the WordPress interface.

Then you can go to menu Settings / EG-Attachments to set plugin parameters


Four ways to include the list of attachments into a post: * With the paper clip button in TinyMCE bar. Click on this button, choose the options, and click insert, * With the shortcode [attachments options ] * With the automatic shortcode: go to the Settings / EG-Attachments, and choose to activate the auto-shortcode. The list of attachments will be added to your post automatically. * In a template file, add the following code: <?php do_shortcode('[attachments *options*]'); ?>

The shortcode options are:

  • template: the template to be used to display attachments. Possibles values: one of the template listed in the menu Tools > EGA Templates. Default value: large,
  • doctype: type of documents to display. Values: image, document, or all. Defaults: document,
  • id: id of the post we want to display attachments. Possible values: id of a post, 0 for the current post, -1 to display attachments that are not attached to a post. Default value: 0,
  • include: list of attachments' id (comma separated) you want to display. Default: nothing, to display all attachments. This option is not supporting the value first, and end supported previously by docid,
  • exclude: list of attachments's id to exclude from the list,
  • orderby: sort option. Values: title, caption, description, file name, size, date, type, menu_order and ASC or DESC. ASC is the default sort order. Default: title ASC.
  • title: title to display before the list. Default: '',
  • titletag: tag to add before and after the title. Default: h2
  • force_saveas forces the browser to show the dialog box (Run / Save as) rather than display attachment. Values: true or false. Default: the default value is defined in the Settings page in administration interface.
  • limit: choose the number of attachements you want to display. Default: all attachments are displayed
  • nofollow: add the attribut "nofollow" to the link, if value is set to 1 or TRUE. Default nofollow=0. This parameter can also be defined in the settings page,
  • logged_users authorizes access to the file, to logged users only, or to all users. Possible values: 0, all users can visualize or download attachments, and 1, only logged users can access to attachments. Default value: the default value is defined in the Settings page in administration interface.
  • tags allows you to select attachments according tags (post tags). Syntax: tags=tag1,tag2. The shortcode will display attachments with either tag1 or tag2,
  • tags_and allows to select attachments linked to all tags specified. Syntax: tags_and=tag3,tag4. The attachments displayed are linked to tag3 AND tag4,

Depredicated options

  • size: size of the icon. Values: large, medium, small or custom. Default: large,
  • docid list of attachments' id (comma separated) you want to display. Default: empty value, if you want to display all attachments. This parameter is replaced by include

In the old posts, shortcodes using size and docid are still working, these two parameters are emulated using the new parameters template and include. In future posts, please use template and include parameters.

Removed options:

  • fields, list of fields to display,
  • icon specify if icons will be displayed or not,
  • display_label: Allow to display label of fields,
  • label label of each document

These parameters don't work anymore with the latest versions. But you can easily get the results you want, by modifying templates.

** Examples :**

*1: [attachments template=medium doctype=document title="Attachments" titletag=h2 orderby="title"] *2: [attachments template=large title="Documents" titletag=h3 orderby="mime DESC"] *3: [attachments title="Books and DVD Reviews" orderby="date DESC" tags="books,dvd" id=-1]

Some explanations about *General behavior of shortcodes

In the menu Settings / EG-Attachments, you will find a section named General behavior of shortcodes. The options in the section are

  • applied to all shortcodes (automatic or manually inserted into posts),
  • used as options for the automatic shortcode,
  • used as default value for the shortcode manually inserted into posts.

Example: if you check the option Force "Save As" when users click on the attachments, you force the download for all attachments displayed by auto-shortcodes, and manual shortcode, except if you specify force_saveas in a shortcode option.


Just activate the clicks counter in the menu Settings / EG-Attachments, and then go to the menu Tools / EGA statistics to see how many clicks you have, for each document.

The graphs are using Google chart tools, and then, require an intenet connection. If you are using internet through a proxy or a firewall, you may encountered some issues to display graphes properly.

Requires: 3.9.0 or higher
Compatible up to: 4.2.0
Last Updated: 10 months ago
Active Installs: 4,000+


4.7 out of 5 stars


0 of 1 support threads in the last two months have been marked resolved.

Got something to say? Need help?


Not enough data

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

100,1,1 100,1,1
100,1,1 100,1,1
100,1,1 100,1,1
0,1,0 100,2,2 100,1,1 100,1,1
50,2,1 100,1,1
100,4,4 100,1,1 100,1,1 100,1,1
100,1,1 67,3,2 100,1,1 100,1,1
100,1,1 100,4,4
100,2,2 100,1,1
100,1,1 100,1,1
100,1,1 50,2,1 100,1,1
100,2,2 50,2,1 100,2,2 100,1,1 100,1,1 100,3,3 100,1,1 50,2,1 75,4,3
100,3,3 100,1,1 100,1,1 100,1,1
50,2,1 100,2,2 100,3,3 75,4,3 67,3,2 100,2,2
100,3,3 100,1,1
100,1,1 100,1,1 100,1,1
50,6,3 50,2,1 100,1,1
100,1,1 100,1,1
100,1,1 100,1,1 100,1,1
100,1,1 100,1,1
100,1,1 100,1,1
100,1,1 100,1,1 100,1,1
67,3,2 100,1,1 100,1,1 100,1,1
100,1,1 100,1,1 100,1,1
100,1,1 100,1,1 100,1,1
100,1,1 100,2,2 100,2,2 100,1,1