Media - Dynamic Shortcodes
Updated over a week ago

The media Dynamic Shortcode allows you to retrieve information about a media file in WordPress.

Usage

The basic syntax is:

{media:info @ID=123}

Where:

- info, the information to retrieve about the media file. Required.

- ID, the ID of the media file. Required.

Info

The info argument specifies what information you want to retrieve. The supported options are:

- url - The URL to the media file.

- title - The title of the media file.

- caption - The caption of the media file.

- description - The description of the media file.

For example:

{media:url @ID=123}

Would output the URL to the media file with ID 123.

Size

You can optionally specify a `size` keyarg to control the image size for url:

{media:url @ID=123 size=thumbnail}

This would output the URL for the thumbnail size of image 123.

If you do not specify a size, it will default to the full size image URL.

Did this answer your question?