There are no functions in wordpress that checks or determine screen sizes. These are all browser related stuff that has got nothing to do with wordpress. There are jquery functions that can maybe work, but again, this is not wordpress related. wp_is_mobile
can be used to load stuff conditionally for mobile phones, but then again, wp_is_mobile
don’t have the logic determining screen sizes, it also can’t differentiate between things like mobile phones and tablets.
Your solution here is to do it old school, using media queries in your main stylesheet as done in all of the default themes shipped with wordpress.
Closing off, I would most probably think that if there was such functions to determine screen sizes in wordpress, that it would be completely overrated and useless and time wasting just to load something simple like a stylesheet
Related Posts:
- I can’t add CSS with functions.php
- How to reference different css (bootstrap) stylesheets for the header and body of a page?
- How to load scripts/styles specific for a page
- TinyMCE custom stylesheets for different post types
- Child Theme Not Overriding Parent Theme
- Enqueue styles after a plugin
- Register and enqueue style.css custom theme
- Enqueue Style Only On Certain Pages Not Working
- different style sheet for just one page template
- Some questions about how proper add 2 CSS file in a WordPress theme?
- Parent theme styles overriding child theme CSS [closed]
- Theme JS is available but theme CSS isn’t
- Proper Way to Load stylesheet on Condition
- get_template_directory_uri() links to child theme not parent
- Page Template Won’t Load Correct CSS File
- Advanced method to control cache of enqueued style/script
- CSS style and app.js not loading
- Stylesheet does not load despite functions.php
- How do I dequeue a Stylesheet, stored in an ‘Assets’ folder?
- Child Theme not loading multiple stylesheets
- Should I use `get_stylesheet_uri()` or `get_template_directory_uri()` when calling my CSS Stylesheet?
- wp_head not injecting css
- How to enqueue style before style.css
- functions.php inject inline css
- Avoid to load default WP styles in login screen
- How do I create a new WP admin color scheme?
- Add attribute to link tag that’s generated through wp_register_style?
- is_front_page not working in functions.php
- Remove “says” from comments
- Simple/basic use of get_current_screen
- I created a child theme and it doesn’t work for some of the css files
- Is it possible to be more page/post specific with admin_enqueue_script?
- Enqueue script o style only if a template part is loaded
- How to override enqueued styles using a child theme
- Load custom css after bootstrap
- The correct way to include JavaScript and CSS in my WordPress Themes
- If is multiple page templates
- Relative path in wp_register_style not working
- Add class or ID to any WordPress function
- Changes in enqueued / registered stylesheet paths not updating—why?
- Enqueue scripts not working with if is page conditional tag in functions.php
- Why does the ‘wp_nav_menu’ function work only until a menu is created?
- Child Theme files – what is needed?
- How do I add Bootstrap and LESS to my migrated WordPress site?
- How to Display Frontend CSS for Administrator only
- WordPress Menuing Question :focus
- Remove stylesheets from Campaign Monitor plugin
- enqueue styles for only mobile wp
- How do I view registered syles and scripts for enqueue
- responsive.css in the WordPress should be prioritized
- Change CSS for logged in users
- How to stop wordpress from injecting hard-coded style into image attachments with captions
- Custom styles.css sheet for visual editor
- Is my code correct to enqueue CSS on a specific page?
- my custom css file downloads then it STOPS!
- header_image() with CSS
- Not all CSS elements transferring via parent to child?
- Scripts not loading when using the wp_enqueue_scripts action
- Why does get_template_directory_uri() not include “www”, only for enqueued stylesheets?
- problem loading stylesheets to wp_head dynamically
- How to insert class in each list of categories?
- This code works, but the way I integrated it is breaking the media uploader. How can I integrate it properly?
- Default Nav Highlight
- Custom styles in Tiny MCE with an external CSS file
- How to pass variables from one function to another or combine functions
- remove/hide wp-editor
- Getting out side of wp root folder from function.php using absolute path
- current_page_item is missing inside wp_nav_menu
- Use conditionals with wp_enqueue_style to attach stylesheet according to post type displayed
- Load CSS before Theme CSS
- Problem with displaying CSS Stylesheets – Am I adding them correctly in my wordpress child theme?
- Can’t load assets
- Can we have conditional CSS styling?
- Post content overflows on my mobile phone
- How to make the RTL.css the dominant css code?
- How do I make a custom “Read More Blogs” button for my blog page
- function class doesnt work
- Setting Up Child Theme To Take Priority
- how to remove a tag in the_category function
- Reference multiple style sheets, clearing styles for permalink page, custom fields for css
- CSS disabled after getting rid of emoji
- How do I create a child theme from PowerMag theme
- How to add styles in existing function?
- Woocommerce – Switching Price for Category
- I need to ‘wp_dequeue_script’ and ‘styles’ and ADD a bunch of other css and js
- Correct way of Enqueue self hosted fonts in sass project
- Help with is_page() and calling css for specific pages in a Child Theme
- Child theme style.css didn’t work properly but the Customize Additional CSS did [closed]
- Why is style.css not loading through the functions.php
- How to automatically add custom classes to headings in content area
- Javascript and Stylesheet in child page
- custom post with loading script per single post
- Preventing PHP Execution in Parent Theme
- Functions.php in child theme that loads CSS file breaks website
- Print all inline styles to head
- Syling Custom Fields echo’s from from functions.php
- functions.php / replacing div’s with new ones?
- using enqueue_script in a shortcode isn’t working
- How can I append and prepend something to all post hyperlinks without using ::before or ::after? PHP hook solution?
- Why don’t ‘wp_nav_menu’ CSS classes work until a menu is created?