[wp-trac] [WordPress Trac] #56154: pre_get_posts fix to show menu on CPT Archives broken in 6.0
WordPress Trac
noreply at wordpress.org
Thu Jul 7 11:21:49 UTC 2022
#56154: pre_get_posts fix to show menu on CPT Archives broken in 6.0
-------------------------------------------+------------------------------
Reporter: joshpaynedesigns | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Menus | Version: 6.0
Severity: normal | Resolution:
Keywords: has-testing-info dev-feedback | Focuses:
-------------------------------------------+------------------------------
Comment (by spacedmonkey):
The issue here is this line
{{{#!php
$query->set( 'tax_query', '' );
}}}
Remove this line should fix the issue. But in trust, I am not sure of what
the original issue is.
I strongly recommend using `wp_get_nav_menu_items` where possible to avoid
issues like this.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56154#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list