Need to display post excerpt on the category page

WordPress category page is displaying full posts content instead of the excerpt for each post, even though I got summary checked in the reading option from the dashboard.

  • Kris Tomczyk

    Hi Mansoor,

    Hope you are doing good today.

    Thank you for Support access. I read your livechat with Huberson. I also log in to your FTP account to edit your theme to add excerpt code to template. But you already did that.
    The solution you make was edit a part of code in content.php file of Twenty Seventeen theme. You change the code:

    the_content( sprintf(
    			__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
    			get_the_title()
    		) );
    
    		wp_link_pages( array(
    			'before'      => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ),
    			'after'       => '</div>',
    			'link_before' => '<span class="page-number">',
    			'link_after'  => '</span>',
    		) );

    to

    if ( is_single() ) :
    			the_content( sprintf(
    				__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
    				get_the_title()
    			) );
    
    			wp_link_pages( array(
    				'before'      => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ),
    				'after'       => '</div>',
    				'link_before' => '<span class="page-number">',
    				'link_after'  => '</span>',
    			) );
    			else:
    
    			the_excerpt( sprintf(
    				__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
    				get_the_title()
    			) );
    
    			wp_link_pages( array(
    				'before'      => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ),
    				'after'       => '</div>',
    				'link_before' => '<span class="page-number">',
    				'link_after'  => '</span>',
    			) );
    			endif;

    I also entered your site and see that this works.

    Please confirm in this thread that the problem has been resolved.

    Kind Regards,
    Kris

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.