WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What do you think it is the best approach to load a theme based on current window size of the client? I am not necessarily talking about resizing, but only about the size at the first load time. I made an attempt here but it is not working. I am not able to deal with the fact that the function responsible of changing the theme is also hooked to 3 filters, in addition to the async type of AJAX. Maybe if you look at the code and tell me where I can improve.

It might be a hot topic to find a solution for, especially now for mobile fist approach.


share|improve this question

You shouldn't need to use a different theme. A good responsive theme should handle all sorts of device window sizes. The new default WP theme, Twenty Thirteen, is responsive mobile first and changes for different device screen sizes. http://wordpress.org/themes/twentythirteen

share|improve this answer

I agree with you about the good responsive theme that should handle all sorts of device window sizes, but it is not always about the screen or window size. It is about screen size, mobile network capabilities and most important; the user behavior and expectations on mobile.

For instance, I don't think an image slider is necessary on a mobile page. Is it enough to just hide it inside a media query? It is useless to hide something if it is going to load anyway and cause delay. Same for high res images and other network expensive media. On top of that, user behavior is critical on mobile. You must show them what is key first. They mostly visit a site to do a specific task and leave. And they want to do it as fast as possible.

Same content to some extent is good, but not all content is relevant for a mobile experience. Don't think I am suggesting two different code bases. There is only one web, but it must be flexible.

Yes you can organize the same content different ways depending on the screen size (again media queries), but in case of a CMS like wordpress, you might need different templates to query and show key information at different stages depending on the device.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.