WordPress.org

Make WordPress Core

Opened 3 months ago

Last modified 3 months ago

#41733 new defect (bug)

manual Post excerpt being ignored

Reported by: maltonge Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.8.1
Component: Themes Keywords: close
Focuses: template Cc:

Description

wordpress 4.8.1 fresh install.

no plugins activated, using 2017 theme although excerpt does not show even when the theme is changed.

created 1 post with a manual excerpt and also edited the default Hello World post and added a manual excerpt. Excerpts do not show on the home page, instead, the full post is shown.

I've been on this for days, I thought it was an issue with the theme then the plugins however even with a fresh WP install I can now confirm it is an issue with WP.

Server Software.

Nginx
PHP 7.1 fpm
maria db InnoDB

Change History (1)

#1 in reply to: ↑ description @SergeyBiryukov
3 months ago

  • Component changed from General to Themes
  • Focuses template added
  • Keywords close added

Hi @maltonge, welcome to WordPress Trac! Thanks for the report.

I've been on this for days, I thought it was an issue with the theme

Twenty Seventeen is indeed designed to show full posts on home page, it only shows excerpts on search pages. If you'd like it to show excerpts on home page, you'd need to create a child theme and replace this line in index.php template:

get_template_part( 'template-parts/post/content', get_post_format() );

with this one:

get_template_part( 'template-parts/post/excerpt', get_post_format() );

If you need any further help, please try the support forums: https://wordpress.org/support/.

Note: See TracTickets for help on using tickets.