• Resolved wanderingeyedog

    (@wanderingeyedog)


    I’m using the following short code to display all of my audio file attachments, according to their category, with the title in the caption that links to the attachment page:

    [mla_gallery post_mime_type="audio" attachment_category="New Music" mla_caption='<a href="?p={+attachment_ID+}">{+title+}</a>']

    This works, however it’s not SEO friendly to use the attachment ID instead of the permalink. Is there any way to do it with the permalink slug?

    The page I need help with: [log in to see the link]

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

    (@dglingren)

    Thanks for your question and for including the source text of your shortcode; very helpful.

    I believe you can use the pagelink_url parameter to get the results you seek. Try coding something like:

    [mla_gallery post_mime_type="audio" attachment_category="New Music" mla_caption='<a href="{+pagelink_url+}">{+title+}</a>']
    

    You can find more information in the “Attachment-specific substitution parameters for the markup template Item part” section of the Settings/Media Library Assistant Documentation tab.

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

Viewing 1 replies (of 1 total)

The topic ‘“+attachment_url+” doesn’t work in shortcode’ is closed to new replies.