[wp-trac] [WordPress Trac] #52461: the_excerpt() not respecting <!--more--> tag on single-post pages.

WordPress Trac noreply at wordpress.org
Sun Feb 7 00:39:19 UTC 2021


#52461: the_excerpt() not respecting <!--more--> tag on single-post pages.
-------------------------------+------------------------------
 Reporter:  bobbybosler        |       Owner:  (none)
     Type:  defect (bug)       |      Status:  closed
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Posts, Post Types  |     Version:
 Severity:  normal             |  Resolution:  invalid
 Keywords:                     |     Focuses:
-------------------------------+------------------------------
Changes (by joyously):

 * status:  new => closed
 * version:  5.6.1 =>
 * resolution:   => invalid


Comment:

 You have misinterpreted the documentation.
 The `the_content()` function called from an archive page (one that shows
 multiple posts) is the only one that handles the More tag, by truncating
 the content. When on the single post page, the More tag generates the ID
 attribute for the More link where the More tag is placed.
 The `the_excerpt()` function retrieves the manually entered excerpt and if
 it is empty, an excerpt is generated from the content by stripping HTML
 tags and counting words according to the excerpt_length.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/52461#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list