Open
Conversation
…e content When a site uses a static front page, the ?format=markdown query parameter caused WordPress to not recognize the request as singular, falling back to the blog post index. Now detects the static front page via is_front_page() and page_on_front option when is_singular() fails. Closes #35 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Filip Ilic <ilic.filip@gmail.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Filip Ilic <ilic.filip@gmail.com>
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.
Summary
?format=markdownon the home URL returned the blog post listing instead of the front page contentis_singular()check inhandle_format_parameter()fails because the extra?format=query var prevents WordPress from recognizing the request as singularis_singular()is false and the site has a static front page configured, checkis_front_page()/is_home()and resolve viapage_on_frontoptionCloses #35
Test plan
curl "http://site.test/?format=markdown"returns static front page content (not blog listing)curl "http://site.test/sample-page/?format=markdown"still works for regular pagescurl "http://site.test/index.md"still works (unaffected.mdURL path)🤖 Generated with Claude Code