Site logo

Archived topic

Category shows full post instead of excerpt

3 replies · Started by shree on February 29, 2020

Viewing posts 1–4 of 4

I am having problem where category pages shows full post instead of excerpt .. i checked all the post and removed <more> tag . i have tried disabling all plugins but it still shows full post.. When i switch to twentytwenty theme, it works properly .. so looks like problem is only when i am using GP ..any help?

Hi there,

Are you using an image post type?

If so try this PHP snippet:

add_filter( 'generate_show_excerpt', function( $show ) {
    if ( 'image' === get_post_format() ) {
        return true;
    }

    return $show;
} );

Adding PHP: https://docs.generatepress.com/article/adding-php/

Thanks Leo..that solved the problem..just curious..why i need extra php function for this basic feature?

By default the excerpt only supports the default post type.

This archived topic is closed to new replies.