How to remove excerpt below posts' featured images (on static home page)?

HI

May I know how to remove the excerpts shown below the posts’ featured images on the static homepage?

I tried to download the plugins (colorlib-plugin-12.zip) and use this code:

function custom_excerpt_length( $length ) {

    if(is_home() || is_front_page() ){
        return 40;
    }
    return $length;

}
add_filter( ‘excerpt_length’, ‘custom_excerpt_length’, 999 );

*Change word length 40 in the above plugin code to whatever you want to display.

But the excerpts still appear on the homepage.

PLease help! Thanks!

Hi

I figured how to use the plugin code!

However, I do not want any excerpts to appear at all (not even 1 word)so I changed ‘40’ to ‘0’. However, this […] appeared below the posts’ featured images instead. Is it possible to remove everything? Thanks!

This is what i mean by […]! Thanks!

Hi @wanderer74,

I hope you are well today and thank you for your question.

However, I do not want any excerpts to appear at all (not even 1 word)so I changed ’40’ to ‘0’. However, this […] appeared below the posts’ featured images instead. Is it possible to remove everything? Thanks!

You can try removing this by adding the following CSS code in the Custom CSS option of your theme on the below path.

Admin Area -> Appearance -> Customize -> Activello Options -> Other -> Custom CSS

body.archive .entry-content,
body.blog .entry-content {
    display: none;
}

Best Regards,
Movin

Hi

THank you so much! It works!

So does it mean I do not need the plugin (colorlib-plugin-12.zip) anymore?

You need it to remove excerpt from page markup just change the excerpt length to 0 in the plugin code as displayed below.

function custom_excerpt_length( $length ) {

if(is_home() || is_front_page() ){
return 0;
}
return $length;
}
add_filter( ‘excerpt_length’, ‘custom_excerpt_length’, 999 );

Hi

Thanks! Getting great support for this theme! =)

You are most welcome here :slight_smile: