[wp-trac] [WordPress Trac] #55426: Two Categories in one URL; Shows Posts that are in BOTH Categories doesn’t work
WordPress Trac
noreply at wordpress.org
Sun Mar 27 14:23:21 UTC 2022
#55426: Two Categories in one URL; Shows Posts that are in BOTH Categories doesn’t
work
--------------------------+------------------------------
Reporter: gooloode | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 5.9.2
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by bcworkz):
Confirmed. SQL contains a `0=1` clause when category name contains a '+'.
I thought a workaround would be to use "pre_get_posts" action to intercept
"category_name" query vars containing a '+' and compose a "tax_query" arg
instead using `'operator => 'AND',`. Same result, the SQL ends up with a
`0=1` clause.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55426#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list