Move/Hide Post Images

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.

Last Reviewed: 8-May-15 (3.3.23) 3.1.* 3.2.* 3.3.*

Customizr introduced built-in feature changes in v3.3. Go to Customize>Content>Post lists.


The following code supports v3.1/3.2

You may wish to adjust the positioning of the Images on Posts. Default is alternate Left/Right, but you can force all to Left or Right. This can be done by:

Where to copy/paste this code?
The simplest way is to use the Custom CSS section of the customizer option screen. If you have many customizations to make in CSS and PHP, then we strongly recommend you create a child theme. Everything you need to know about creating a child theme with Customizr here.

Hide Images:


Move all Images to Left:


Move all Images to Right:


Since the Snippet was originally published, it has been identified that the CSS solution is not ‘pixel-perfect’.
@ElectricFeet has published an update using php which is a more accurate solution.


Where to copy/paste this code?
We strongly recommend you create a child theme and add this to the Child Theme functions.php.
Download a start-up child theme here.

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


Move all Images to Left:


Move all Images to Right:

Related Snippets you may also like

3 thoughts on “Move/Hide Post Images

  • Mark Janus

    I am struggling making a minor change to add a border around images in pages and the content of posts. I can’t seem to sort out the CSS code to make this happen. Here is an example page. I would like to put a border around that image.

    • Dave Bardell Post author

      Sorry for not replying sooner. I hope you managed to fix this. If not, I’d suggest the Forum would be a better place to get a solution for this, and include a link to your Site.

      Thanks for using Customizr.

Comments are closed.