Programmatically Altering Gallery Link and image size?
Programmatically Altering Gallery Link and image size?
Programmatically Altering Gallery Link and image size?
Displaying all the images from all of my articles
Maybe you need to set max-width Just add max-width:100% below your code @media only screen and (max-width: 480px) { .gallery-columns-4 .gallery-item { width: 100%; max-width: 100%; } }
I am unsure of the issue. If it is simply the text is too large, try using CSS to scale the font size. .gallery-item h3 { font-size: 1rem; }
You should change the color of the link with css.
The problem was being caused by the smush’s lazy load feature, I just excluded those galleries and now everything is fine
use this code in single.php $post->ID, ‘post_type’ => ‘attachment’, ‘numberposts’ => -1, ‘orderby’ => ‘title’, ‘order’ => ‘ASC’, ‘post_mime_type’ => ‘image’, ))) { foreach( $images as $image ) { $attachmenturl = wp_get_attachment_url($image->ID); $attachmentimage = wp_get_attachment_image_src( $image->ID, full ); $imageDescription = apply_filters( ‘the_description’ , $image->post_content ); $imageTitle = apply_filters( ‘the_title’ , $image->post_title ); $i++; if (!empty($imageTitle)) … Read more
How to get all id_attachment with one loop?
I find a solution for this: // Customise the WordPress gallery html layout add_filter(‘post_gallery’,’customFormatGallery’,10,2); function customFormatGallery($string,$attr){ $output = “<div class=\”mihan-gallery\”>”; $posts = get_posts(array(‘include’ => $attr[‘ids’],’post_type’ => ‘attachment’)); foreach($posts as $imagePost){ $output .= “<a class=\”mihangitem\” href=”https://wordpress.stackexchange.com/questions/384853/”.wp_get_attachment_image_src($imagePost->ID,”mihan-large’)[0].”‘><img src=”https://wordpress.stackexchange.com/questions/384853/”.wp_get_attachment_image_src($imagePost->ID,”mihan-medium’)[0].”‘></a>”; } $output .= “<div class=\”clear\”></div></div>”; return $output; }
a SET of wordpress native galleries with title and text?