Tagged: x
-
AuthorPosts
-
September 7, 2016 at 3:47 pm #1165108
I’ve been trying to make use of WordPress’s built in responsive images that were added to the core last year within some custom child themes using X. Unfortunately one of the crucial functions
wp_get_attachment_image_srcset()
appears to be broken when used in X theme. It always returns false when running X theme or a child theme. It seems to break at line 1173 of /wp-includes/media.php in WP 4.6.1. The call toapply_filters()
constantly returns empty.September 7, 2016 at 10:33 pm #1165745Hi there,
Thanks for posting in.
It’s intentionally disabled to allow X theme use its own image sizes. But you can enable it by adding this code to your child theme’s functions.php
function x_disable_wp_image_srcset( ) {}
Hope this helps.
September 8, 2016 at 3:55 pm #1167042What affect will this have on images output by X theme?
September 9, 2016 at 12:44 am #1167564Hi there,
It will change the image sizes that X theme usually displays. Some may appear blurry if the picked size is not appropriate screen size. But it shouldn’t affect the overall functionality.
Thanks!
-
AuthorPosts