[wp-trac] [WordPress Trac] #54258: post_type query parameter added to url causes incorrect type search results (5.8.1)
WordPress Trac
noreply at wordpress.org
Wed Oct 13 20:38:48 UTC 2021
#54258: post_type query parameter added to url causes incorrect type search results
(5.8.1)
-------------------------------+------------------------------
Reporter: arestelle | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version: 5.8.1
Severity: normal | Resolution:
Keywords: | Focuses:
-------------------------------+------------------------------
Comment (by arestelle):
Replying to [comment:4 sabbirshouvo]:
> Please mention your theme function here that adds the parameter as
reference. Without seeing any code no one will be able to identify what is
the actual problem.
I identified it myself in the next comment; but the function is
[https://github.com/vyh/wordpress/blob/master/themes/monza-mod-
vyh/functions.php#L77 here]. I removed `|| $query->is_search()` from the
condition to no effect, then added that back and removed `$query->is_tax()
||` and the parameter was no longer unexpectedly added.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54258#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list