• Resolved nicegamer7

    (@nicegamer7)


    Assume I have these shortcodes:

    [mla_gallery numberposts=1 attachment_category="the-cat" date_query="array('before' => 'first day of -1 month')"]
    [mla_gallery numberposts=1 attachment_category="the-cat" date_query="array('before' => 'first day of -2 month')"]
    [mla_gallery numberposts=1 attachment_category="the-cat" date_query="array('before' => 'first day of -3 month')"]
    [mla_gallery numberposts=1 attachment_category="the-cat" date_query="array('before' => 'first day of -4 month')"]
    [mla_gallery numberposts=4 attachment_category="the-cat" date_query="array('before' => 'first day of -1 month')" mla_output="paginate_links,prev_next"]

    A note:
    – There will only every be one attachment in ‘the-cat’ per month

    Is there any way to make it so that when I go to the next page (using the last shortcode), the galleries (the first four shortcodes) go forward 4 items instead of 1? The reason I am doing it this way is because each gallery is actually using an alternate shortcode (I’ve omitted it here to save space) which can only process one item at a time. If MLA could call the alternate shortcode once per item, then I could combine the four galleries into one.

    Thanks.

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

    (@dglingren)

    Thanks for another interesting question. I think the best way to accomplish your goal is the custom shortcode approach I outlined in your related topic:

    Multiple Attributes for Alternate Shortcode

    For this aspect of the application it looks like using one [mla_gallery] shortcode with numberposts=4 and orderby=date order=DESC might work. Then, in your custom shortcode you would call the alternate shortcode for each item in the gallery to compose the gallery display.

    I am marking this topic resolved, but please update it if you need more specific guidance. Thanks again for your interest in MLA.

    Thread Starter nicegamer7

    (@nicegamer7)

    This is the solution I came up with too, I was just checking that there wasn’t already a way to do this. Thanks.

    If you’d like, I can make the shortcode as generic as possible so that it can be made into an MLA plugin.

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your response, your understanding and your resourcefulness. Thanks as well for your offer to contribute your solution to the MLA example plugins library.

    If you do come up with something you’d like to share, you can contact me at my web site to follow up.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Different Pagination Offset’ is closed to new replies.