Support » Plugin: Media Library Assistant » Noob here, and need some help :

  • Resolved vmercader


    I’ve used the WordPress gallery before and I’ve used some other third party, category enabled, media library lister plugins, too… but I seemed to be road-blocked when trying to use the Shortcodes for MLA…

    For test, I tried this:

    • Upload PDFs, set their Att. Category to “Brochures”
    • Typed in this shortcode:[mla_gallery attachment_category='brochures' mla_markup='default' mla_style='default' order='desc']
    • I have all other settings by default

    What I wanted to output is this:

    <a href="[link to PDF URL]" target="_blank">[Attachment title/name]</a>

    I did make a new Markup template with the ul and li instead of a table, but I still can’t get it to work. I used it with a normal TwentyTwelve theme of wordpress (themeless). I am using the shortcode in a page.

    Any help for a noob?

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


    Thanks for your interest in the plugin and for your question. Here are a few suggestions that might help you get what you want.

    The example shortcode you gave in your bullet list is a good start, but as coded it will only select images, the default MIME type. You can add post_mime_type=all or post_mime_type=application/pdf to get a gallery of PDF documents.

    The mla_markup='default' and mla_style='default' parameters are not necessary because ‘default’ is, well, the default.

    You might also want to add size=icon to your query, which will give a nice little thumbnail image for PDFs. Here’s another example:

    [mla_gallery post_mime_type=application/pdf post_parent=all size=icon link=file]

    The parameters in the above example select just the PDFs (post_mime_type=application/pdf), show all of the PDFs regardless of what post/page they are attached to (post_parent=all), display an appropriate icon (size=icon) since PDFs are not images and makes each icon a link (link=file) to the corresponding PDF file.

    The PDFs will be listed in the gallery even if they are unattached, and the Caption field will be displayed under the icon for each file. If you omit the size-icon parameter you will get a text link in place of an image. To filter the list by “Att. Category” you can code:

    [mla_gallery attachment_category="brochures" post_mime_type=application/pdf post_parent=all size=icon link=file]

    Note that you must use the internal name for the taxonomy and the slug value(s) for the match. See the “Taxonomy Parameters” section in the documentation for more details.

    The Settings/Media Library Assistant Documentation tab has lots of information on other [mla_gallery] parameters you can use to select items in different ways and display different results. Here are a couple of links to Support Forum topics along the lines of your question:

    For a “ul”-style gallery, here’s another approach. Change your shortcode to look like this example (all on one line):

    [mla_gallery attachment_category=’brochures’ post_mime_type=all link=file size=none columns=1 mla_float=left itemtag=”ul” icontag=”li” captiontag=”span”]

    The tag parameters give you the bulleted list. The columns=1 and mla_float=left avoid a centering problem.

    I hope that gives you a good start on your application. Let me know if you have any other questions or problems.

Viewing 1 replies (of 1 total)
  • The topic ‘Noob here, and need some help :’ is closed to new replies.