I use a media query in my html to load a new stylesheet for the grid if needed. Can I translate this to work within my functions.php?
wp_register_style('html5blank', get_template_directory_uri() . '/style.css', array(), '1.0', 'all');
wp_enqueue_style('html5blank'); // Enqueue it!
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/1140.css" type="text/css" media="all and (min-width: 1200px)" />
See wp_enqueue_style() in the WordPress Codex, the last parameter in particular has to do with the CSS media.
wp_enqueue_style('html5blank', false, array(), false, 'all and (min-width: 1200px)');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With