Change $content_width based on screen size (functions.php)
I’ve got a WordPress install where I’m trying to change this content_width code:
if( ! isset( $content_width ) ) $content_width = 290;
in my functions.php file based on the users screen size. I’ve tried using CSS media queries, but for our particular use-case, I need to be able to change this in the functions.php file based on the users screen size.
Ideally 1080 for Desktop, 720 for tables, and 290 for mobile.