Title: Pagination affects multiple galleries
Last modified: April 14, 2022

---

# Pagination affects multiple galleries

 *  Resolved [beachman14](https://wordpress.org/support/users/beachman14/)
 * (@beachman14)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/pagination-affects-multiple-galleries/)
 * 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](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/pagination-affects-multiple-galleries/#post-15560175)
 * 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.

 * ![](https://ps.w.org/media-library-assistant/assets/icon-256x256.png?rev=973502)
 * [Media Library Assistant](https://wordpress.org/plugins/media-library-assistant/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/media-library-assistant/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/media-library-assistant/)
 * [Active Topics](https://wordpress.org/support/plugin/media-library-assistant/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/media-library-assistant/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/media-library-assistant/reviews/)

## Tags

 * [gallery pagination](https://wordpress.org/support/topic-tag/gallery-pagination/)

 * 1 reply
 * 2 participants
 * Last reply from: [David Lingren](https://wordpress.org/support/users/dglingren/)
 * Last activity: [4 years, 1 month ago](https://wordpress.org/support/topic/pagination-affects-multiple-galleries/#post-15560175)
 * Status: resolved