Get the image title and alt from custom query

At the top of your code, just after $large_image, you can add this : $image_alt = get_post_meta((int)get_post_meta( get_the_ID() , “_thumbnail_id” , true ), ‘_wp_attachment_image_alt’, true); $image_title = get_the_title((int)get_post_meta( get_the_ID() , “_thumbnail_id” , true )); The alt for attachment is stock in post_meta (_wp_attachment_image_alt), the title is a post_title. And then your replace the value in … Read more

add_image_size limiting sizes (???)

WordPress has its own built-in image sizes. These sizes are: thumbnail // Thumbnail (default 150px x 150px max) medium // Medium resolution (default 300px x 300px max) medium_large // Medium-large resolution (default 768px x null max) large // Large resolution (default 640px x 640px max) The medium-large image size has no height set, meaning that … Read more

New portfolio items appearing smaller on the grid

Are your source images all of the same size ? If you hover the src attribute for your images with the Chrome Developper Tools, it will tell you the natural size. For the smaller images, the natural size is: 292 x 190, 400×260. For the bigger images, the natural size is: 306×260 (all seem to … Read more