# I wonder what it would take to add …

- Link: https://cagrimmett.com/micro/aa6b4febfe/
- Published: 2023-02-21T11:35:12-05:00
- Author: Chuck Grimmett

I wonder what it would take to add a random order option to the Gallery block on
WordPress? It is one of the few things I miss about the Classic editor.

## Comments

### By: Jan Boddez

- Link: https://jan.boddez.net/notes/d3416d0044
- Published: 2023-02-21T16:06:00-05:00

Looks like the Gallery block itself employs a filter to, if necessary, manipulate
its inner Image blocks. Wonder if a similar filter could be used to simply shuffle`
$parsed_block['innerBlocks']`? [https://github.com/WordPress/WordPress/blob/dd87b5a4bd237d347f9b5bd2e493200b3945ff79/wp-includes/blocks/gallery.php#L19](https://github.com/WordPress/WordPress/blob/dd87b5a4bd237d347f9b5bd2e493200b3945ff79/wp-includes/blocks/gallery.php#L19)

That is, until [https://github.com/WordPress/gutenberg/issues/9701](https://github.com/WordPress/gutenberg/issues/9701)
is fixed. Could be wrong, though.
