[wp-trac] [WordPress Trac] #23867: add_rewrite_endpoint causes front-page.php template to be ignored
WordPress Trac
noreply at wordpress.org
Mon Mar 24 16:51:00 UTC 2014
#23867: add_rewrite_endpoint causes front-page.php template to be ignored
-------------------------------+------------------------------
Reporter: lumpysimon | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Rewrite Rules | Version: 3.5.1
Severity: major | Resolution:
Keywords: reporter-feedback | Focuses:
-------------------------------+------------------------------
Comment (by fabrizim):
I think the issue occurs during the parse_vars in WP_Query. See the code
here:
https://core.trac.wordpress.org/browser/tags/3.8.1/src/wp-
includes/query.php#L1655
This test does not take into account custom endpoints, only a hardcoded
set of query args - any additional args result in a failing test. I think
this should be expanded to include any user defined endpoints. I wrote a
plugin for using a custom post type as the front page and during some
development, added a filter to fix this, now endpoints can be used on a
static front page. See the following for the specific function that I
wrote. It would only be 2 lines of code to add to the core, but I don't
know how to add a "pull request" in svn :/
https://plugins.trac.wordpress.org/browser/cpt-on-front-
page/tags/1.0.1/plugin.php#L33
--
Ticket URL: <https://core.trac.wordpress.org/ticket/23867#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list