-
Notifications
You must be signed in to change notification settings - Fork 860
Wordpress gallery: Added css and custom markup #1234
Conversation
This is great. Thanks! |
My mistake. I fixed. |
This is very helpful. I do find that I prefer to ignore the WP gallery columns setting so I can use breakpoints like so. (but I'm happy to have the option to use the columns)
|
@emaia did you look into using the Block Grid for this? |
I tried to adapt this so that is works with WP gallery column setting, but id didn't work, probably missing something obvious
|
Hi @colin-marshall . Today I checked this and update my PR. Aditionaly, I added the possibility to use dynamic sizes for columns in small and medium screens but I could not do that without a hardcode in Wordpress media-template.php. Anyway, this works with default values in case not use the hardcode. What you think? @nitrokevin check my code now. |
Related #1228
In this PR:
Example with Venobox (https://github.com/nicolafranchini/VenoBox):
$ npm install venobox --save
in app.scss add:
@import "../../../node_modules/venobox/venobox/venobox.css";
in app.js add:
$ npm run build
In gallery option (admin) define to point to media file.
Additional: if you want to add a custom select field for gallery small and medium columns in the Wordpress settings, add code bellow in the /wp-includes/media-template.php (after line 751).