WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.4k stars 4.16k forks source link

User can sort images using an `orderby` setting in Gallery block #15370

Open cjyabraham opened 5 years ago

cjyabraham commented 5 years ago

The gallery shortcode has an orderby parameter. Is it possible to move that functionality into the Gallery Block workflow? Perhaps the best place to put it is during the "Edit Gallery" phase where you can manually order the images. At that point you could have a drop-down above which allows for sorting by a field and then allow manual override after.

draganescu commented 4 years ago

Thinking about this, while it looks priority low, I would say photo intensive sites could use default sorting by title or upload date or other image meta. However it does look like a plugin wouldl solve this a lot better than baking features into core.

Is this a feature the core gallery block should support (aside from the fact that the shorcode does)?

af1 commented 4 years ago

Thinking about this, while it looks priority low, I would say photo intensive sites could use default sorting by title or upload date or other image meta. However it does look like a plugin wouldl solve this a lot better than baking features into core.

Is this a feature the core gallery block should support (aside from the fact that the shorcode does)?

Yes. I want to sort the images and there's no way to do so. If I could sort, I could use the Gallery Block, sort, then convert them to single image blocks and be done. I could avoid: me having to use the classic editor, edit the HTML, copy out to Sublime Text, sort the lines, and paste back in.

I'm a photographer and my blog posts are almost all single images, not a gallery. No way am I reordering them by hand.