Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

Thanks.

share|improve this question
add comment

2 Answers

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
add comment

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
add comment

Your Answer

 
discard

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.