Hot answers tagged

4

WordPress generates more than 3 thumbnails or image sub sizes because there are actually more than 3 standard/core image sizes in WordPress. Moreover, themes and plugins can also register custom image sizes. :) The 6+1 standard/core image sizes Default (4): Thumbnail, Medium, Large and Medium Large (medium_large), but only the first three that you can ...


2

There's wp_get_attachment_image_url introduced in WordPress 4.4.0. It takes these arguments: int $attachment_id - Image attachment ID. string|array $size - Optional. Image size to retrieve. Accepts any valid image size, or an array of width and height values in pixels (in that order). Default 'thumbnail'. bool $icon - Optional. Whether the image should be ...


2

Wordpress has a hook for that. Here is a sample code: function featured_image_dimensions( $content, $post_id, $thumbnail_id ){ $help_text = '<p>' . __( 'recommended dimensions - H980px by W450px', 'my_domain' ) . '</p>'; return $help_text . $content; } add_filter( 'admin_post_thumbnail_html', 'featured_image_dimensions', 10, 3 ); Add ...


1

So after checking your search.php template, actually the issue is not with WordPress. Instead: That the_post_thumbnail() (as in if ( the_post_thumbnail() )) echoes the post thumbnail and returns nothing which then bypasses your conditional (doesn't echo your img tag), so you should instead use has_post_thumbnail(): if ( has_post_thumbnail() ) { // echo ...


1

It appears that it's eventually used as a parameter to wp_constrain_dimensions where '0' means 'no limit'. It's only used directly in media.php:85 } elseif ( 'medium_large' === $size ) { $max_width = intval( get_option( 'medium_large_size_w' ) ); $max_height = intval( get_option( 'medium_large_size_h' ) ); if ( intval( $content_width ) > 0 ...


1

Your container div for the content area has a class of .row, which is set to display:flex in Bootstrap. Direct children of a parent with display:flex can't be floated. To fix this you'll either need to update the .row class so it's not set to display:flex (display:block works for me), or add an interior wrapper div so that the image and paragraphs not direct ...


Only top voted, non community-wiki answers of a minimum length are eligible