Gallery shortcode is empty but magically creates a gallery

admin2025-06-07  4

I have a post with only this [gallery id="file"] in text editor but in visual, there appears a gallery. I was moving these posts and updating gallery ids automatically, but these posts don't have any gallery image ids to move or update. I checked the database, I found [gallery id="file"] there in post_content too.

How does this magic work? I need the ids.

I have a post with only this [gallery id="file"] in text editor but in visual, there appears a gallery. I was moving these posts and updating gallery ids automatically, but these posts don't have any gallery image ids to move or update. I checked the database, I found [gallery id="file"] there in post_content too.

How does this magic work? I need the ids.

Share Improve this question asked Oct 26, 2018 at 12:07 vtQQvtQQ 14 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

The default behaviour of the gallery shortcode, when no IDs are given, is to display all images that are attached to the current page/post. An image is attached to a post when it's uploaded directly to a specific post.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1749230395a317456.html

最新回复(0)