[wp-trac] [WordPress Trac] #25349: Can't retrieve calculated excerpt bound by <!--more--> on single page view
WordPress Trac
noreply at wordpress.org
Sun Jun 29 15:04:01 UTC 2025
#25349: Can't retrieve calculated excerpt bound by <!--more--> on single page view
-------------------------------+-----------------------------
Reporter: chriscoyier | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Posts, Post Types | Version: 3.6.1
Severity: normal | Resolution:
Keywords: has-patch close | Focuses: template
-------------------------------+-----------------------------
Changes (by SirLouen):
* keywords: has-patch needs-testing => has-patch close
Comment:
== Reproduction Report
=== Description
❌ This report can't validate that the issue can be reproduced.
=== Environment
- WordPress: 6.9-alpha-60093-src
- PHP: 8.2.28
- Server: nginx/1.29.0
- Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.28)
- Browser: Chrome 137.0.0.0
- OS: Windows 10/11
- Theme: Minimal Theme 1.0.0
- MU Plugins: None activated
- Plugins:
* Test Reports 1.2.0
=== Reproduction Instructions
1. Create a page template. Sample code in Supp artifacts, add it to your
template (classic theme)
2. Also add support for the excerpt for pages `add_post_type_support(
'page', 'excerpt' );`
3. Create two pages
4. The first page will have set the Page Template "Custom Page Template"
in Page Attributes
5. The second page, will have an excerpt, and using the `<!--more-->`
thing within the content.
6. Go to the first page with the custom template
7. ❌ More is shown in the content as expected
[[Image(https://i.imgur.com/rX4xhcX.png)]]
=== Actual Results
1. ❌ Error condition is not occurring
=== Additional Notes
- I have not read through the revisions like [30085] (are they actually
fixing this? Why was this report not set as fixed?), but I'm unable to
reproduce this, so either is already fixed, or I'm doing something wrong.
Check my instructions and tell me if I'm missing something.
- Proposing this for `close` with either `worksforme` or `fixed` (if the
patch is actually fixing this, be aware that I have not gone through it,
just testing this for the sake of knowing what's the current status of the
ticket)I
=== Supplemental Artifacts
Sample `page-custom.php`
{{{#!php
<?php
/*
Template Name: Custom Page Template
*/
$args = array(
'post_type' => 'page',
'posts_per_page' => -1,
);
$all_posts_query = new WP_Query( $args );
if ( $all_posts_query->have_posts() ) :
while ( $all_posts_query->have_posts() ) :
$all_posts_query->the_post();
the_title( '<h2>CUSTOM: ', '</h2>' );
the_excerpt();
the_content();
endwhile;
wp_reset_postdata();
endif;
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/25349#comment:22>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list