• Resolved benjjamieson

    (@benjjamieson)


    [ Moderator note: title adjusted, please refrain from using help, urgent, emergency, asap, etc. in topic titles. ]

    Hi There,

    I’m new to MLA, and am trying to get this working for a download library.

    1: I added two PDF files in a category called “Club Resources” with a slug of ‘club-resources’.

    2: I create a new, blank page for testing on the site.

    3: Add the shortcode to display the files.

    Nothing displays.

    So far, here are the shortcodes I have tried:

    [mla_gallery attachment_category=club-resources mla_caption='<a href="{+downloadlink_url+}">{+post_title+}</a>' mla_output=list]

    [mla_gallery attachment_category=club-resources]

    [mla_gallery post_mime_type="application/pdf"]

    All just produce a blank page.

    Am I missing something obvious?

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

    (@dglingren)

    Thanks for your question and for posting the source text of the shortcodes you’ve experimented with. I think a few adjustments will help get you what you want.

    Try adding post_mime_type="application/pdf" to your first example, i.e.,

    
    [mla_gallery attachment_category=club-resources post_mime_type="application/pdf" mla_caption='<a href="{+downloadlink_url+}">{+post_title+}</a>' mla_output=list]
    

    Your first and second examples fail because the default post_mime_type is “image” and won’t display PDF items. Your third example fails because by default only those items “attached” to the current post/page are selected. You could change it to something like this:

    
    [mla_gallery post_mime_type="application/pdf" post_parent=all]
    

    to display all the PDF documents in the Media Library.

    I am marking this topic resolved, but please update it if you have any problems or further questions regarding the above suggestions. Thanks for your interest in the plugin.

    • This reply was modified 7 years, 11 months ago by David Lingren.
Viewing 1 replies (of 1 total)
  • The topic ‘Shortcode Does nothing?’ is closed to new replies.