WordPress.org

Forums

Simple Catch
How to remove excerpt under slider (4 posts)

  1. fotonarya
    Member
    Posted 2 years ago #

    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.

    http://wordpress.org/extend/themes/simple-catch/

  2. Catch Themes
    Member
    Theme Author

    Posted 2 years ago #

    Why don't you just use css to hide it.

    .featured-text {
    display: none;
    }

    Regards,
    Sakin

  3. hueyapan
    Member
    Posted 2 years ago #

    THANK YOU for that fix, I was looking for a solution, too!

  4. fotonarya
    Member
    Posted 2 years ago #

    Good idea, cannot get in my head before...
    But i like to remove hyperlink in slider image too,
    how i can achieve that

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic