Opened 8 years ago
Last modified 8 years ago
#40521 new defect (bug)
Using a custom query var on a static front page results in wrong $post
Reported by: | mechter | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 4.7.4 |
Component: | Posts, Post Types | Keywords: | |
Focuses: | Cc: |
Description
Steps to reproduce:
- Create a page and make it the static front page
- Add a new query var via filter in theme's functions.php:
add_filter( 'query_vars', function( $vars ) { array_push( $vars, 'buggy' ); return $vars; } );
- Open the front page setting the newly added query var (e.g. "https://example.com/?buggy=yep")
Result: displays the latest blog post
Expected result: displays front page
Change History (2)
Note: See
TracTickets for help on using
tickets.
I was able to reproduce this using a child theme with TwentyFifteen as the parent. TwentyFifteen does not have a front-page.php file. Also on TwentySixteen, which does not have a front-page.php either.