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

WordPress Trac noreply at wordpress.org
Tue Mar 16 14:46: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:
-------------------------------+------------------------------

Old description:

> Hello there, I've never reported a WordPress bug before, so bear with me.
> I'm been working with a reputable theme developer, Themeco, with an issue
> I was trying to resolve, and [according to their
> estimation](https://theme.co/forum/t/layouts-and-post-excerpts-
> bug/83415/14/), it appears to be either an issue with Wordpress core or
> an issue with the Wordpress documentation being inaccurate. In either
> case, I'l like to report it as succintly as possible and hopefully get it
> resolved.
>
> According to [your documentation
> here](https://codex.wordpress.org/Customizing_the_Read_More), I should be
> able to enter a <!--more--> tag or the corresponding "Read More" block in
> the block editor and that should limit what the_excerpt() returns to the
> text before the more tag (instead of the 55 word limit). And, indeed, it
> does so everywhere except for the single-post page. On the single-post
> page, it either returns the manual excerpt or it returns the 55 character
> limit if there is no manual excerpt.
>
> I may not be doing a good job describing this, so please see [this
> thread](https://theme.co/forum/t/layouts-and-post-excerpts-bug/83415) for
> a fuller explanation of the issue. This may appear trivial, but I have
> reasons for wanting this functionality to work for a site I am working
> on.

New description:

 Hello there, I've never reported a WordPress bug before, so bear with me.
 I'm been working with a reputable theme developer, Themeco, with an issue
 I was trying to resolve, and [according to their
 estimation](https://theme.co/forum/t/layouts-and-post-excerpts-
 bug/83415/14/), it appears to be either an issue with WordPress core or an
 issue with the Wordpress documentation being inaccurate. In either case,
 I'l like to report it as succintly as possible and hopefully get it
 resolved.

 According to [your documentation
 here](https://codex.wordpress.org/Customizing_the_Read_More), I should be
 able to enter a <!--more--> tag or the corresponding "Read More" block in
 the block editor and that should limit what the_excerpt() returns to the
 text before the more tag (instead of the 55 word limit). And, indeed, it
 does so everywhere except for the single-post page. On the single-post
 page, it either returns the manual excerpt or it returns the 55 character
 limit if there is no manual excerpt.

 I may not be doing a good job describing this, so please see [this
 thread](https://theme.co/forum/t/layouts-and-post-excerpts-bug/83415) for
 a fuller explanation of the issue. This may appear trivial, but I have
 reasons for wanting this functionality to work for a site I am working on.

--

Comment (by sabernhardt):

 This is not a bug, though #24588 proposed the enhancement of editing the
 excerpt function to accept snippets created by a "more" tag/block.

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


More information about the wp-trac mailing list