Viewing 1 replies (of 1 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for your question. The “date/time taken” may (or may not) be found in a few different places; it is usually captured by the camera and added to the “meta data” stored in the image file. Note that only JPEG and TIFF files contain this data; PNG files do not have it.

    WordPress makes a good effort to find the value and copy it to a field named created_timestamp in the image_metadata stored with the image. The original data is in the IPTC/EXIF meta data within the image file. You can find more information about date/time taken and a number of other camera/picture values in this earlier support topic:

    Camera Exif Fetch

    I would start with created_timestamp. You can add this to an [mla_gallery] shortcode by coding something like this:

    [mla_gallery post_parent=all numberposts=20 orderby=date order=DESC mla_caption="Created: {+meta:image_meta.created_timestamp,timestamp+}"]

    The post_parent=all numberposts=20 orderby=date order=DESC parameters select the 20 most-recently-uploaded images in the Media Library; you can substitute whatever data selection parameters you want. The mla_caption parameter changes the information displayed below each item in the gallery; it contains a “Field-level Substitution Parameter”, which has three parts. The meta: prefix says the data is in the meta data WordPress stores with each item. The field you want is image_metadata.created_timestamp, i.e., created_timestamp within the image_meta array. The ,timestamp option/format value formats the value (a UNIX timestamp) in a more understandable way.

    You can change the format by adding a pattern to the timestamp format/option value. For example:

    {+meta:image_meta.created_timestamp,timestamp('j F, Y')+]</li>)+}
    {+meta:image_meta.created_timestamp,timestamp(H:I:s)+]</li>)+}

    The default format will look like “31/12/2014 23:59:00”, the 'j F, Y' format looks like “31 December, 2014”, and the H:I:s format looks like “23:59:00”. You can find complete information on all this in the “Field-level Substitution Parameters” section of the Settings/Media Library Assistant Documentation tab.

    If the created_timestamp field is not populated in your images, post a link to one or more examples and I can analyze them to see if the value can be found in the IPTC/EXIF meta data within them.

    I am marking this topic resolved, but please update it if you have problems or further questions regarding finding and displaying the date/time taken information in your images. Thanks for your interest in the plugin.

Viewing 1 replies (of 1 total)

The topic ‘Date Taken/Created Column’ is closed to new replies.