Using Shortcodes to Display your Materials

We have provided several item-embedding methods to help you make exhibits out of your pages or posts. The items you display can be ones that you’ve uploaded to the DRS, items in the DPLA’s repository, or items that you’ve uploaded locally to the WordPress media library. You can select the “Single Item” option to add only one item at a time, or the “Tile Gallery” option to arrange multiple items in tiles. The “Gallery Slider” option will create a playlist of multiple items that appear in the same row and change periodically. The “Media Playlist” option will add interactive items like video clips, audio clips, or documents that use the ISSUU interface. You can also add maps and timelines to display items encoded with associated locations or dates.

To embed your items, click the button that reads “Add Toolkit Shortcodes,” which is next to the “Add Media” button.

Then choose which method of embedding items that you would like to use.

On the next screen, in the “DRS Items” tab, select the items to include. Within this tab, you can search to help you find items more easily, using any metadata that would attached to the piece you’re looking for. You may also click “Show filtering options” to filter your results.

You may also browse and search items from the DPLA’s repository in the “DPLA Items” tab, or add local items in the appropriate tab.

Note: If you add local items using the WordPress "Media Library," they will not behave the same way as other embedded items. Adding these local items using a Toolkit Shortcode, however, means that they will behave like your other items.

The “Selected items” tab will accumulate all the items you have selected. By clicking the “Settings” tab, you can choose what metadata you would like to display and make use of a few design options.

Click the “Insert shortcode” button when you are finished. Your shortcode has now been generated: it is the code bounded by brackets. 

The Project IDs (PIDs) of DRS items displayed with your shortcode are listed, separated by commas, after the “id” attribute. The PID that represents an item in the DRS takes the form of neu:xxxx, where “xxxx” is a unique string of alphanumeric characters that varies in length. The shortcode’s other attributes control the design options of the item, gallery, carousel, or playlist. What you select in the point-and-click interface changes these options. This can include what size thumbnails render; whether captions appear, where, and with what contextual information; the style of a gallery; and whether a gallery that animates starts without clicking.

Once you have generated a custom shortcode by clicking, you may double click on that shortcode in order to add items to or modify aspects of the embedding method, using the point-and-click interface. Click “Insert Shortcode” again, and your changes will be reflected.

You may also directly modify the short code text. To add items to your shortcode, for example, you may find the PID associated with an item you want to add from your DRS set or collection–it is located at the end of the URL of the item’s page in the DRS–and add it to the list of PIDs under the “id” attribute. Similarly, you may remove an item by deleting its PID from the shortcode. The order of the PIDs in the list is also the order of how they will be displayed in your exhibit. As you explore the different options and become more familiar with the syntax of the shortcodes, you may directly modify the other attributes.