Gallery custom html output
-
I added image gallery to my page via
Add Media > Create Gallery
. I don’t want to output default html of the gallery, neither is sufficient the option to change such attributes asitemtag
,icontag
, andcaptiontag
. I want my own html entirely.I’ve tried to hook to
post_gallery
and grab src of images that are included as a gallery into that page and output them:add_filter( 'post_gallery', 'my_name_page_gallery', 10, 2 ); function my_name_page_gallery($output, $attr) { $output = get_post_gallery_images(); return $output; }
But I get the following error:
Maximum function nesting level of ‘512’ reached, aborting! in /wp-includes/shortcodes.php on line 234
What am I doing wrong? How do I get gallery images’ urls and output custom html?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Gallery custom html output’ is closed to new replies.