Use indexables for retrieving posts for the llms.txt file#22327
Merged
thijsoo merged 10 commits intorelease/25.4from Jun 11, 2025
Merged
Conversation
18 tasks
78e89b5 to
b185889
Compare
b185889 to
ca5f49f
Compare
Pull Request Test Coverage Report for Build 73357a4236d45956f83bcf9af3a3df0566838edeDetails
💛 - Coveralls |
thijsoo
requested changes
Jun 10, 2025
Contributor
thijsoo
left a comment
There was a problem hiding this comment.
CR 1 suggestion 1 comment.
| $exclude_old = false; | ||
|
|
||
| if ( $post_type === 'post' ) { | ||
| $exclude_old = true; |
Contributor
There was a problem hiding this comment.
Maybe rename this to exclude_older_than_one_year or something since that is what this does. I was very confused on what old meant in this case.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Summary
This PR can be summarized in the following changelog entry:
noindexed posts from getting into the llms.txt file.Relevant technical choices:
Test instructions
Test instructions for the acceptance test before the PR gets merged
This PR can be acceptance tested by following these steps:
Test preventing specifically
noindexed postsTest generating the llms.txt file where your most recently modified post is:
Allow search engines to show this content in search resultssetting is set toyes(or the default)## PostssectionAllow search engines to show this content in search resultssetting is set tonoTest impact of the PR making indexables the source of truth:
add_filter( 'Yoast\WP\SEO\should_index_indexables', '__return_false' );filter)noindexpostsnoindexed. Make sure that post the most recently modified one.cornerstone. Make sure that post is NOT in the 5 most recently modified ones.noindexed post exists in the former but not in the latterRelevant test scenarios
Test instructions for QA when the code is in the RC
Impact check
This PR affects the following parts of the plugin, which may require extra testing:
Post Listssection of Add content in the llms.txt file #22257UI changes
Other environments
[shopify-seo], added test instructions for Shopify and attached theShopifylabel to this PR.Documentation
Quality assurance
Innovation
innovationlabel.Fixes https://github.com/Yoast/reserved-tasks/issues/613