The tag has no usage guidance.

learn more… | top users | synonyms

6
votes
2answers
2k views

Responsive Theme Design: how have slideshow on desktops/tablets and static photo on mobile using same template?

I am building my first responsive WP site with my own custom WP Theme. The primary templates are part fluid, part fixed. This enabled me to create only 3 "versions", a desktop, tablet and mobile ...
3
votes
3answers
213 views

Responsive Images

Is there a native function to display the correct responsive image size for post thumbnails or gallery images depending on the screen resolution? Normally I'm using: 1.Custom image sizes: function ...
0
votes
1answer
157 views

Change function in responsive theme

I have this code on my header: $rPosts->query('showposts=3&cat=2174'); But I want to show 4 posts on desktop and 2-3 on mobile. In CSS I could use @mediaqueries, could I use something like ...
0
votes
1answer
1k views

Why is wp_get_attachment_image_src returning wrong dimensions? [duplicate]

I am using wp_get_attachment_image_src to construct the srcset attribute of an img tag. In that attribute I want to output a comma separated list of image urls along with the image widths. Using the ...
24
votes
5answers
9k views

How do I disable responsive images in WP 4.4?

I succesfully converted my 4.3.1 install to all https. After updating to 4.4. I have a problem with the new srcset attribute. While the src attribute for images is set using https, the srcset ...
7
votes
2answers
1k views

WP 4.4. responsive images browser choosing the “wrong” one

I'm glad that WP 4.4. ships with a built-in responsive image feature. But I'm not that happy with it. I have set up some custom image sizes in my functions.php: add_image_size('post-thumbnails', 600,...
1
vote
3answers
1k views

Don't load scripts if on mobile/tablet

Would like to ask the question is it possible to stop the laoding of some scripts when viewed on a mobile/tablet device ? In the theme functions file you have wp_enqueue_script(...). How would you go ...
9
votes
1answer
3k views

Proper usage of wp_is_mobile()?

I have developed responsive theme and I want to submit it the wordpress.org. Before submitting it I want to use wp_is_mobile() in my theme, but according to Function Reference/wp is mobile it is a ...
2
votes
1answer
2k views

Making WordPress Gallery (.gallery-item) Responsive?

Shortcode for Gallery: [gallery link="file" columns="5" size="medium"] I’m using a 5 column gallery on an inner page of a website, obviously when the site responds down to mobile and even tablet ...
0
votes
1answer
931 views

Change theme based on window size

I want to send a browser info (window width) to the server via AJAX. The server doesn't need to respond with any data, however, only change the theme based on that window width. This is my attempt: ...
1
vote
3answers
2k views

Run shortcode at certain resolution

I've gone a roundabout way of trying to ask a question about this here: Loading shortcode with ajax but figured it might be worth asking the fundamental question of what I am trying to do without ...