Support » Plugin: Media Library Assistant » Idea: "where used" as shortcode

  • Hello David,

    I’m not sure if this is technically possible, but here’s an idea. I’m trying to have the images on my site cross-referenced as much as possible to invite people to browse MORE. Obviously. 🙂

    Most recently I switched to Jetpack’s “Carousel” image viewer because it is one of the few viewers that shows the image title, caption AND long description.

    The attachment pages on the other hand have received extra love with WP3.5 and are almost like a full post now, and from my point of view, the long description would be an excellent place to add references to the galleries/portfolio items (whatever) where the images are used.

    I was thinking of something like [mla_where_used] which would then output a (configurable, freely formattable) string like “This attachment appears in <post title1>, <post title2>, <post title3>”, where <post title1> etc. are links of course that the visitor can click on. 🙂

    Or maybe something like [mla_where_used id=”1234″] to show where one specific attachment is used, so that it can be used not just in attachment pages, but posts, pages etc.

    Another benefit would be that users can find “back” into the site in case they ended up on an attachment page through a Google search, or some other way.

    Alternatively, this could perhaps also be something for a widget that could be placed into the sidebar of an attachment page?

    What do you think?

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


    This is an excellent and stimulating question/suggestion!

    The existing [mla_gallery] shortcode is almost capable of satisfying your requirement. The custom style and markup templates can be used to compose “a (configurable, freely formattable) string”. The attachment-specific and field-level substitution parameters can populate the string with all sorts of data.

    What’s missing? Well, the where-used information hasn’t been exposed as a data source or a substitution parameter. Handling arrays (<post title1>, <post title2>, <post title3>) and making them links needs to be worked out. Something like ids=current would be useful to avoid hard-coding the attachment id into the shortcode(s).

    As you mentioned, the Description field works well for this – shortcodes in that field seem to be handled without problems. How would you populate the Description field? Maybe some sort of template that does that automatically would help, similar to the IPTC/EXIF mapping but from another source.

    I will give this some more thought for the coming releases – thanks again for getting me started.

    Hello David,

    thanks for the response to my idea.

    At the moment, I’m filling the WP Description field manually; I’m using attachments (mostly for images) much like a post, and the description usually contains some story or background information about a photo (example: subtropical forest image)

    I’m using Jetpack’s “Carousel” slideshow since it is the only slideshow module (that I know) which acts more like an “attachment page viewer” and shows all attachment info (Title, Caption, and Description).

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Idea: "where used" as shortcode’ is closed to new replies.