• Hello,

    I like to remove the excerpt and the title under slider. I already have a child theme. I have function.php in my child themes and write this code :

    if (function_exists('simplecatch_sliders')) {
    
    function simplecatch_sliders() {
    	global $post;
    	//delete_transient( 'simplecatch_sliders' );
    
    	global $simplecatch_options_settings;
        $options = $simplecatch_options_settings;
    
    	$postperpage = $options[ 'slider_qty' ];
    
    	if( ( !$simplecatch_sliders = get_transient( 'simplecatch_sliders' ) ) && !empty( $options[ 'featured_slider' ] ) ) {
    		echo '<!-- refreshing cache -->';
    
    		$simplecatch_sliders = '
    		<div class="featured-slider">';
    			$get_featured_posts = new WP_Query( array(
    				'posts_per_page' => $postperpage,
    				'post__in'		 => $options[ 'featured_slider' ],
    				'orderby' 		 => 'post__in',
    				'ignore_sticky_posts' => 1 // ignore sticky posts
    			));
    			$i; while ( $get_featured_posts->have_posts()) : $get_featured_posts->the_post(); $i++;
    				$title_attribute = apply_filters( 'the_title', get_the_title( $post->ID ) );
    				$excerpt = get_the_excerpt();
    				if ( $i == 1 ) { $classes = "slides displayblock"; } else { $classes = "slides displaynone"; }
    				$simplecatch_sliders .= '
    				<div class="'.$classes.'">
    					<div class="featured">
    						<div class="slide-image">';
    							if( has_post_thumbnail() ) {
    
    								if( $options[ 'remove_noise_effect' ] == "0" ) {
    									$simplecatch_sliders .= '<span class="img-effect pngfix"></span>';
    								}
    
    								$simplecatch_sliders .= get_the_post_thumbnail( $post->ID, 'slider', array( 'title' => esc_attr( $title_attribute ), 'alt' => esc_attr( $title_attribute ), 'class'	=> 'pngfix' ) ) ;
    							}
    							else {
    								$simplecatch_sliders .= '<span class="img-effect pngfix"></span>';
    							}
    							$simplecatch_sliders .= '
    						</div> <!-- .slide-image -->
    					</div> <!-- .featured -->
    
    				</div> <!-- .slides -->';
    			endwhile; wp_reset_query();
    		$simplecatch_sliders .= '
    		</div> <!-- .featured-slider -->
    			<div id="controllers">
    			</div><!-- #controllers -->';
    
    	set_transient( 'simplecatch_sliders', $simplecatch_sliders, 86940 );
    	}
    	echo $simplecatch_sliders;
    } // simplecatch_sliders
    }

    But the excerpt still in there, nothing change.
    Anyone please help me

    Thanks.

    https://www.ads-software.com/extend/themes/simple-catch/

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Theme: Simple Catch] How to remove excerpt under slider’ is closed to new replies.