Envira Gallery Pagination Not Working in Metabox Custom Field
Support › MB Custom Post Type › Envira Gallery Pagination Not Working in Metabox Custom Field
- This topic has 6 replies, 2 voices, and was last updated 1 month ago by
Peter.
-
AuthorPosts
-
July 22, 2025 at 7:02 AM #48593
saint
ParticipantHi Team,
I am using Envira Gallery to display a list of thumbnails and a lightbox to display the corresponding image and running into an issue where when paginate to the next page, two issues occur:
1.) When I paginate back to "page 1", the thumbnails do not refresh/reflect the thumbnails in that group. It just continues to show the thumbnail on "page 2"
2.) When I click on a "page 1" thumbnail, it opens the lightbox gallery just fine, and I can scroll back-and-forth between the images.
When I navigate to "page 2", and click on the thumbnail image. It just takes me directly to the image URL.
I've went ahead and:
a.) Turned off my caching plugin temporarily to test (Perfmatters)
b.) Flushed all Envira cache
c.) Cleared all Envira transientsGIF if issue:
https://share.zight.com/ApuWpmojAnd as it turns out, it seems the issue appears when adding the Envira Gallery Shortcode in a Custom Field of a CPT via the Meta Box AIO plugin.
If the Envira Shortcode is added to a normal page, the pagination looks fine. The images open on the lightbox, and when paginated back to Page 1, the page is refreshed.
Confirmation GIF available if interested.
Thank you.
July 23, 2025 at 11:11 PM #48605Peter
ModeratorHello,
Thanks for reaching out.
I'm afraid that supporting the issue comes from a third-party plugin is beyond our scope of support. I recommend contacting Envira Gallery to ask for more information.
Refer to our support policy https://support.metabox.io/topic/support-policy/
July 24, 2025 at 4:11 AM #48607saint
ParticipantHi Peter,
Thanks for your note. Actually, I started this thread after working with Envira support because it appears the pagination for the Envira gallery shortcode, when added to a normal page looks fine.
But when added in a Metabox custom field, that is when it displays the abnormal behavior.
That's why I went ahead and created this ticket. Do you know if there's something that Metabox adds to it's custom fields that may be causing conflict with their gallery?
Thank you.
August 1, 2025 at 3:57 AM #48631August 4, 2025 at 9:03 PM #48639Peter
ModeratorHello,
Sorry for the late reply. I don't have any idea why the issue happens. I suggest you use some fields like Custom HTML or Textarea to add the gallery shortcode and output it in the frontend without being affected by any JavaScript code of Meta Box.
Let me know how it goes.
August 13, 2025 at 1:31 AM #48693saint
ParticipantHi Peter,
No problem, thank you for your reply. I just tried both suggestions:
1.) For the Textarea, it doesn't seem to have any effect and had the same result.
GIF: https://share.zight.com/nOuOelmQ
2.) For the Custom HTML area, I added the shortcode in there as well - however, I couldn't find a way to display that on the frontend.
It was added to the Custom HTML area in the Custom Fields group settings/config, but I didn't see it in the CPT record itself, or was able to find a way to output that out.
Given that Envira support was able to properly render the gallery directly, but once in a Metabox field it breaks, I suspect something in the output process of a metabox field is interrupting this process?
August 13, 2025 at 8:46 PM #48699Peter
ModeratorHello,
You can use the shortcode to output the field value in the builder https://docs.metabox.io/shortcode/
or use the PHP code to output the field value in the theme template https://docs.metabox.io/displaying-fields-with-code/ -
AuthorPosts
- You must be logged in to reply to this topic.