• Resolved kkosmetik

    (@kkosmetik)


    Hi,

    I am using the Avada theme (3.6.2) which sets a content_width of “669px” in it’s functions.php. While this is working good for most of my site, it’s causing issues if I am using the tiled mosaic gallery function. In that case, the gallery isn’t responsive on mobile phones or when you shrink the browser size on normal desktop PCs. Instead of the images getting shrinked, so they fit in the screen, the gallery gets cut off on the right side and you don’t even have a possibility of scrolling to the right to view the rest, since the rest of the site is responsive.

    According to the Avada developers the reason is that the Jetpack plugin doesn’t properly parse the content_width value, when it’s NOT an integer, but a string value (e.g. including “px”). When I remove the “px” the gallery is fully responsive. So can you fix that for the next version?

    https://wordpress.org/plugins/jetpack/

Viewing 1 replies (of 1 total)
  • Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    I’m afraid you’re not meant to use “px” when defining the $content_width value. WordPress Core uses integers everywhere: in core (here is an example) as well as in the default themes (here is Twenty Fourteen).

    Removing “px” from the $content_width value defined by your theme seems like the best course of action here in my opinion.

Viewing 1 replies (of 1 total)
  • The topic ‘Jetpack doesn't properly parse content_width value’ is closed to new replies.