' . puresimple_excerpt($excerpt) . '
' ; echo '' . __('Read More', 'puresimple') . '' ; break; } echo '
Home › Forums › WordPress Themes – Premium › Pure & Simple › Remove images
Hello,
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,
Sandrine
Hi 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
Thank you. Can you tell me where exactlly do I have to add the code you give me ?
Hi 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
I 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 '';
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 '
';
break;
// blog style 2
case "blogstyle2" :
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 '' . puresimple_excerpt($excerpt) . '
' ;
echo '' . __('Read More', 'puresimple') . '' ;
break;
}
echo '
';
break;
// blog style 3
case "blogstyle3" :
if ( has_post_thumbnail() ) {
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 '' . puresimple_excerpt($excerpt) . '
' ;
echo '' . __('Read More', 'puresimple') . '' ;
break;
}
echo '
';
break;
// blog style 4
case "blogstyle4" :
echo '';
if ( has_post_thumbnail() ) {
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 '' . puresimple_excerpt($excerpt) . '
' ;
echo '' . __('Read More', 'puresimple') . '' ;
break;
}
puresimple_multi_pages();
echo '
';
break;
}
?>
Hi there,
Have you got any problem on this code?
Thanks
With our premium themes, we offer access to site documentation, video tutorials and timely support. Even if you have just started on WordPress, our support staff have the patience to help you create appealing sites gracefully.
Company
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.To find out more, including how to control cookies, see here: Privacy Policy
© Copyright © 2023 Styled Themes. All Right Reserved.