• How to add pagination to gallery shortcode?
    Here is my shortcode for a page:
    [gallery type="rectangular" ids="66,60,62,63,64,65,57,55,54,53,168,210,209,208,207,202,203,204,205"]
    I want 10 gallery in each pagination.
    Note: Gallery images are not a post , they are just image uploaded in media…
    I am using jetpack carousel for image animation. And I have found code to override gallery shortcode.But it will disable jetpack carousel functions.
    Is there default functions to add pagination in gallery shortocode?
    Please let me know how to fix the problems.Please help me with errors and problems ??Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi there, you might want to use a different gallery plugin to make this happen for you. There are plenty of them out there that will give you pagination.

    Moderator bcworkz

    (@bcworkz)

    You can override the gallery shortcode handler (“post_gallery” filter), using its source code as a starting point and altering to allow pagination. Gallery images are still posts, but of the “attachment” type, so pagination is not too different than for regular posts.

    TBH, Malcom’s suggestion is better. I present this option just to offer another possibility.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to add pagination in gallery shortcode if the image is not post type image?’ is closed to new replies.