Galleries are limited to 12 images
Galleries are limited to 12 images
Galleries are limited to 12 images
Image shows up in editor, but not in published blog post
WP galleries in posts after import. How do I do it?
Unable to Edit or Add Photo Gallery Under Portfolio in WordPress 6.2.5
Fix position of an image while using elementor pro gallary widget
show title and displaying link gallery
If you look at the gallery shortcode you will see that you are using the wrong filter. With post_gallery you can override the complete html of the shortcode. Your code performs a str_replace on an empty string, resulting in an empty return and subsequently the generation of the default gallery html. Further on there is … Read more
Thanks to Toms reply I took a closer look again with fresh eyes and saw that I wrote columns: ‘2’ instead of columns: 2. I also added the linkTo: ‘media’ attribute and rearranged the code to follow documentation (passing BlockProps to innerBlocksProps – I edited the original code post to reflect that).
There are 2 core problems here: has_block(‘gallery’, $post->post_content) should never have worked as there is no block named gallery, the core block is named core/gallery While the gallery block used an attribute similar to the shortcodes in the past, modern gallery blocks are containers that contain image blocks As a bonus, the code in your … Read more
Images uploaded in customized gallery do not link to media