Post list thumbnails reordering in small viewports

Note : the following code snippet requires advanced WordPress developer skills. There's no guarantee that this snippet works as is with the latest version of our themes, and with the latest version of WordPress. That's why you need to always test any code snippets in a staging environment before implementing it in a production site.

3.1.* 3.2.*

Nov 2014 update: Tested with WordPress 4.0 and Customizr 3.2.5 . Still works if you choose to display thumbnails on the left/right. Will not do anything if you display them on top/bottom. Basically ’cause the aim of this script, as you can see in the example pictures, is to avoid the alternation top/bottom, which could be unaesthetic. So if you use to display them on top or bottom, probably you already don’t select the “Alternate thumbnail/content” option, if not you should 😛

May 2014 update: Now works also on window resize

As you know Customizr, by default, alternates thumbnails and articles content when displaying post list.

You have already learned how to change this behavior here .

But what if you wanted to maintain the alternation except when the content of the article and the thumbnail are arranged one below the other (e.g. in small width devices)?

What you need to achieve that is adding the following code in your child-theme functions.php


Normal behavior


Running the script


That’s all folks!


Where to copy/paste this code? => in your functions.php file. We strongly recommend you create a child theme. Download a start-up child theme here.

Remember: you shouldn’t edit the theme’s functions.php.

Everything you need to know about child theme with Customizr here.

Related Snippets you may also like

3 thoughts on “Post list thumbnails reordering in small viewports

Comments are closed.