Home › Forums › WordPress Themes – Premium › Pure & Simple › Remove images
- This topic has 5 replies, 15 voices, and was last updated 7 years, 4 months ago by
Sushil Adhikari.
-
AuthorPosts
-
January 10, 2016 at 7:10 pm #16921
Sandrine Brugot Maillard
ParticipantHello,
Can you tell me if it’s possible to remove images from category, like in this one ?http://yspaddaden.com/category/1-romans/a-lire/
Thank you for answering,
SandrineJanuary 11, 2016 at 6:45 am #22270Sushil Adhikari
ModeratorHi Sandrine Brugot Maillard,
IF you want to remove featured image from category page, then you need to customize blog-style.php template. First you need to create folder and name as partials.
Then you need to copy blog-style.php file from parent theme [Directory: sitefolder->wp-content->themes->puresimple->partials->blog-style.php ] and paste in to child theme inside partials folder[Directory: sitefolder->wp-content->themes->puresimple-child->partials->blog-style.php].Then you need to add this code replacing the_post_thumbnail() function
if ( !is_category()) { the_post_thumbnail(); }
Don’t hesitate to ask a question for further information.
Note: Using child theme, will prevent your changes to overwrite on theme update.
Thanks
January 13, 2016 at 12:07 pm #21436Sandrine Brugot Maillard
ParticipantThank you. Can you tell me where exactlly do I have to add the code you give me ?
January 13, 2016 at 1:29 pm #21248Sushil Adhikari
ModeratorHi there,
After you copied blog-style.php template in child theme[Directory: sitefolder->wp-content->themes->puresimple-child->partials->blog-style.php], there you can find
the_post_thumbnail()
[Most probably on line no-28 ] function where you need to replace this function with this code
if ( !is_category()) { the_post_thumbnail(); }
Note: If you’re not technically sound in WordPress, we suggest you to take help of a developer otherwise you will be in trouble.
Thanks
January 13, 2016 at 1:48 pm #21100Sandrine Brugot Maillard
ParticipantI found it 4 times abd changed. It looks like this ways now :
<?php $bloglayout = get_theme_mod( 'blog_style', 'blogstyle1' ); switch ($bloglayout) { // blog style 1 case "blogstyle1" : echo '
'; //the_title( sprintf( ' ', esc_url( get_permalink() ) ), '
' ); echo ''; if ( is_sticky() && is_home() && ! is_paged() ) : echo ''; _e( 'Featured', 'puresimple' ); echo ''; endif; echo ''; if(the_title( '', '', false ) !='') the_title(); else _e('Untitled', 'puresimple'); echo '
'; echo ''; puresimple_posted_on(); echo ''; if ( has_post_thumbnail() ) { echo ''; break; // blog style 2 case "blogstyle2" : echo ''; if ( !is_category()) { the_post_thumbnail(); } echo ''; } $excon = get_theme_mod( 'excerpt_content', 'content' ); $excerpt = get_theme_mod( 'excerpt_limit', '50' ); switch ($excon) { case "content" : the_content(__('Read More', 'puresimple')); break; case "excerpt" : echo '' . puresimple_excerpt($excerpt) . '
' ; echo '' . __('Read More', 'puresimple') . '' ; break; } echo '
'; if ( has_post_thumbnail() ) { echo ''; if ( !is_category()) { the_post_thumbnail(); } echo ''; } else { echo ''; } echo ''; echo ' '; if ( is_sticky() && is_home() && ! is_paged() ) : echo ''; _e( 'Featured', 'puresimple' ); echo ''; endif; echo ''; if(the_title( '', '', false ) !='') the_title(); else _e('Untitled', 'puresimple'); echo '
'; echo ''; puresimple_posted_on(); echo ''; $excon = get_theme_mod( 'excerpt_content', 'content' ); $excerpt = get_theme_mod( 'excerpt_limit', '50' ); switch ($excon) { case "content" : the_content(__('Read More', 'puresimple')); break; case "excerpt" : echo ''; break; // blog style 3 case "blogstyle3" : if ( has_post_thumbnail() ) { echo '' . puresimple_excerpt($excerpt) . '
' ; echo '' . __('Read More', 'puresimple') . '' ; break; } echo '
'; if ( !is_category()) { the_post_thumbnail(); } echo ''; } echo ''; echo ' '; if ( is_sticky() && is_home() && ! is_paged() ) : echo ''; _e( 'Featured', 'puresimple' ); echo ''; endif; echo ''; if(the_title( '', '', false ) !='') the_title(); else _e('Untitled', 'puresimple'); echo '
'; echo ''; puresimple_posted_on(); echo ''; $excon = get_theme_mod( 'excerpt_content', 'content' ); $excerpt = get_theme_mod( 'excerpt_limit', '50' ); switch ($excon) { case "content" : the_content(__('Read More', 'puresimple')); break; case "excerpt" : echo ''; break; // blog style 4 case "blogstyle4" : echo '' . puresimple_excerpt($excerpt) . '
' ; echo '' . __('Read More', 'puresimple') . '' ; break; } echo '
'; if ( has_post_thumbnail() ) { echo ''; break; } ?>'; if ( !is_category()) { the_post_thumbnail(); } echo ''; } echo ''; echo ' '; if ( is_sticky() && is_home() && ! is_paged() ) : echo ''; _e( 'Featured', 'puresimple' ); echo ''; endif; echo ''; if(the_title( '', '', false ) !='') the_title(); else _e('Untitled', 'puresimple'); echo '
'; echo ''; puresimple_posted_on(); echo ''; $excon = get_theme_mod( 'excerpt_content', 'content' ); $excerpt = get_theme_mod( 'excerpt_limit', '50' ); switch ($excon) { case "content" : the_content(__('Read More', 'puresimple')); break; case "excerpt" : echo '' . puresimple_excerpt($excerpt) . '
' ; echo '' . __('Read More', 'puresimple') . '' ; break; } puresimple_multi_pages(); echo '
January 13, 2016 at 2:31 pm #16922Sushil Adhikari
ModeratorHi there,
Have you got any problem on this code?
Thanks
-
AuthorPosts
- You must be logged in to reply to this topic.