• Resolved ensenab

    (@ensenab)


    Hi
    fist of all thank you for this great plugin!

    I have a problem with speaking urls and the attachment page. My shortcode is working with the normal wordpress urls: …/?attachment_id=106
    but not with custom urls e.g. /%year%/%monthnum%/%day%/%postname%/
    With custom urls the page is emty. My attachment page ist image.php.

    Here is the shortcode:
    [mla_gallery ids='{+request:attachment_id+}’ mla_caption='{+iptc:2#105+}{+iptc:2#120+}{+iptc:2#090+}{+iptc:2#116+}’ size=’large’]

    Thanks and best regards
    Jan

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

    (@dglingren)

    Thank you for the positive feedback and for your question. Thanks as well for posting the complete shortcode text, which is very helpful.

    Your shortcode works with the “normal” WordPess URLs because the attachment_id query argument is part of the URL for the page. That is where the {+request:attachment_id+} parameter value comes from.

    You can make your shortcode work with any permalink format by changing the source of your ids= parameter. In the “Gallery-specific Substitution Parameters” section of the Settings/Media Library Assistant Documentation tab you will find:

    page_ID, id – the ID value of the post/page in which the gallery appears

    So, try changing your shortcode to:

    
    [mla_gallery ids='{+page_ID+}' mla_caption='{+iptc:2#105+}{+iptc:2#120+}{+iptc:2#090+}{+iptc:2#116+}' size='large']
    

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

Viewing 1 replies (of 1 total)

The topic ‘attachment page and custom url’ is closed to new replies.