Post list thumbnails reordering in small viewports


Note :This snippet works only with the Classical style option. The Classical style option can be enabled in Appearance > Customize > Advanced > Theme Style. More about the theme style option here


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

pl-normal

Running the script

plt-reordered


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


We can help you to implement this snippet

Coding is our job and we know WordPress inside and out. We can help you to customize your website with small chunks of code snippets like this one.

Send us your request and we'll get back to you quickly.



3 thoughts on “Post list thumbnails reordering in small viewports

Comments are closed.