variable crop option with add_image_size()

OK I have found out a way to do this. With the plugin, with some checkboxes I am setting a crop option in the db in wp_options table, just like WP does it for the thumbnail, medium and large sizes. So my big image sets the add_option(‘big_crop’, true) Than in functions.php I do: if ( … Read more

My customizer’s setting doesn’t set to the default and needed to click the control’s “Default” button before it’ll be set

As what I’ve commented, the rawurlencode() function is the reason because WordPress have a lot of restrictions. I found that, that kind of problem will exist if you have a % percent sign (in my case, produced by the rawurlencode()) in your ‘default’ => $value. One of the solutions, encode some or the whole part … Read more

Update add_image_size

@WisdmLabs is right. For old images you will have to use that plugin to regenerate thumbnails. For new images which you will upload it will respect the 600 height mentioned in child theme’s functions.php file.

How can I set different banner images using background cover at different breakpoints?

The way I would do this would be to inline the background: url(…) property. <?php if ( has_post_thumbnail() ) : $hero = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), ‘hero’, ” ); $tablet = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID), ‘tablet’, ” ); $phablet = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), ‘phablet’, ” ); $phone = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), ‘phone’, ” ); ?> <style> @media only screen and … Read more