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:
/* START OF Move/Hide Post Images */ /* Thumbnail Removed */ .post .tc-thumbnail { display: none; } /* Reset Post position/width */ .post .tc-content { margin-left: 0px; min-width: 100%; } /* END OF Move/Hide Post Images */
Move all Images to Left:
/* START OF Move/Hide Post Images */ /* Thumbnail Left */ .post .tc-thumbnail { float: left; /* margin-left: 0px; */ } /* Post Content Right */ .post .tc-content { float: right; } /* END OF Move/Hide Post Images */
Move all Images to Right:
/* START OF Move/Hide Post Images */ /* Thumbnail right */ .post .tc-thumbnail { float: right; } /* Post Content left */ .post .tc-content { float: left; } /* END OF Move/Hide Post Images */
@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:
// START OF Move/Hide Post Images // Moves post-list images to left. add_filter( 'tc_post_list_layout', 'my_post_list_layout'); function my_post_list_layout() { return array( 'content' => 'span8', 'thumb' => 'span4', 'show_thumb_first' => true, 'alternate' => false ); } // END OF Move/Hide Post Images
Move all Images to Right:
// START OF Move/Hide Post Images // Moves post-list images to right. add_filter( 'tc_post_list_layout', 'my_post_list_layout'); function my_post_list_layout() { return array( 'content' => 'span8', 'thumb' => 'span4', 'show_thumb_first' => false, 'alternate' => false ); } // END OF Move/Hide Post Images
3 thoughts on “Move/Hide Post Images”
@ElectricFeet identified that the original CSS snippet was not ‘pixel-perfect’. Snippet has been refreshed to add an improved solution.
Hi-
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. http://evomultisport.com/about-me/ I would like to put a border around that image.
Thanks!!
Mark
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.