[Support request] Category shows full post instead of excerpt

Home Forums Support [Support request] Category shows full post instead of excerpt

Home Forums Support Category shows full post instead of excerpt

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1180642
    shree

    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?

    #1180932
    Leo
    Staff
    Customer Support

    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/

    #1181251
    shree

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

    #1181499
    Leo
    Staff
    Customer Support

    By default the excerpt only supports the default post type.

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