StyledThemes

Remove images

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #16921

    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

    #22270
    Sushil Adhikari
    Moderator

    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

    #21436

    Thank you. Can you tell me where exactlly do I have to add the code you give me ?

    #21248
    Sushil Adhikari
    Moderator

    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

    #21100

    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 '
    '; if ( has_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 '
    '; puresimple_multi_pages(); if( get_theme_mod( 'hide_edit' ) == '') { edit_post_link( __( 'Edit this Post', 'puresimple' ), '', '' ); } echo '
    '; break; // blog style 2 case "blogstyle2" : echo '
    '; if ( has_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 '
    '; $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 '
    '; puresimple_multi_pages(); if( get_theme_mod( 'hide_edit' ) == '') { edit_post_link( __( 'Edit this Post', 'puresimple' ), '', '' ); } echo '
    '; break; // blog style 3 case "blogstyle3" : if ( has_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 '
    '; $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 '
    '; puresimple_multi_pages(); if( get_theme_mod( 'hide_edit' ) == '') { edit_post_link( __( 'Edit this Post', 'puresimple' ), '', '' ); } echo '
    '; break; // blog style 4 case "blogstyle4" : echo '
    '; if ( has_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 '
    '; $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 '
    '; if( get_theme_mod( 'hide_edit' ) == '') { edit_post_link( __( 'Edit this Post', 'puresimple' ), '', '' ); } echo '
    '; break; } ?>
    #16922
    Sushil Adhikari
    Moderator

    Hi there,

    Have you got any problem on this code?

    Thanks

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.