New answers tagged gallery
There is a filter called post_gallery which allows you to create your own html for your gallery. You could copy and edit the code from the gallery_shortcode function, (which creates the gallery code? and use that in the filter, with titles included/
The quick & dirty way, to set the title as caption, would be to use SQL (untested): UPDATE wp_posts SET post_excerpt = post_title WHERE post_excerpt = '' AND post_type = 'attachment' AND post_status = 'inherit' AND post_mime_type = 'image/jpeg' AND ID = 123 Here we target the jpeg image with ID ...
Add order and/or orderby parameters to your shortcode. For example: [gallery columns="4" ids="310,309,311,312,315,314,313" order="DESC" orderby="ID"] https://codex.wordpress.org/Gallery_Shortcode#Options
Gallery with the same caption to all images: Here are two different ways to achieve this dynamically, without editing the caption for each image in the gallery. If we use the custom attribute same_caption in our gallery shortcode: [gallery ids="1120,1123,1119" same_caption="Same Caption ..."] then we can get the same caption for that gallery. Before: ...
There is a simple solution for this. Let the gallery use the 5 column grid system and using the @media-queries we can alter it for tablet and mobile. I just tested it on your given URL and it works perfect. But try to remove any custom codes you have used before since I had to remove it in order to use the following code. /* For displaying 3 columns on ...
A little background: WP stores the attachments in the same database table as posts. Therefore the table rows correspond to the fields of the media edit modal: get_post_gallery_images will return you URLs to the images, but not the actual data in the database. You could do a reverse-query and look for posts that contain the image URL but that would be more ...
Top 50 recent answers are included