• Resolved beachman14

    (@beachman14)


    This is a great plugin! I have a page on which I want to have 4 MLA galleries. My shortcodes are selecting various files from the media library based on the category field. When I add pagination to the short codes to one of the galleries, it affects all four on the page. Can I only have one gallery per page, or am I doing something wrong? A sample of the shortcodes I am using is below.
    Thanks,
    Mark

    [mla_gallery post_parent=all attachment_category=Pictures posts_per_page=48 mla_caption="{+title+}"]
    [mla_gallery post_parent=all attachment_category=Pictures posts_per_page=48 mla_output="previous_page,first" mla_link_text='← Previous Gallery Page' mla_rollover_text="Previous or first page for this tag"]
    
    <div style="float: right">
    [mla_gallery post_parent=all attachment_category=Pictures posts_per_page=48 mla_output="next_page,last" mla_link_text='Next Gallery Page → ' mla_rollover_text="Next or last page for this tag"]
    </div>
Viewing 1 replies (of 1 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for the positive feedback and for your question. Thanks as well for including the source text of your shortcodes; very helpful.

    You can find a solution in the “Page selection parameters for next_page and previous_page output types” subsection of the “Support for Alternative Gallery Output, e.g., Pagination” section in the Settings/Media Library Assistant Documentation tab, where it says:

    mla_page_parameter – the name of the parameter containing the current page number; default “mla_paginate_current”. You can change the name if you need multiple paginated galleries on one post/page. If you use this parameter, make sure you add it to the gallery shortcode and all pagination shortcodes for that gallery, and use the same unique value in all shortcodes for the specific gallery.

    Simply add this parameter to each of your four galleries, e.g.:

    [mla_gallery mla_page_parameter=gallery_one post_parent=all attachment_category=Pictures posts_per_page=48 mla_caption="{+title+}"]
    [mla_gallery mla_page_parameter=gallery_one post_parent=all attachment_category=Pictures posts_per_page=48 mla_output="previous_page,first" mla_link_text='← Previous Gallery Page' mla_rollover_text="Previous or first page for this tag"]
    
    <div style="float: right">
    [mla_gallery mla_page_parameter=gallery_one post_parent=all attachment_category=Pictures posts_per_page=48 mla_output="next_page,last" mla_link_text='Next Gallery Page → ' mla_rollover_text="Next or last page for this tag"]
    </div>
    

    Be sure to add the parameter to the gallery shortcode and both of the pagination shortcodes, and use a different value for each set of three shortcodes.

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

Viewing 1 replies (of 1 total)

The topic ‘Pagination affects multiple galleries’ is closed to new replies.