admin管理员组文章数量:1417103
So I am modifying the main query and basically asking:
if is_post_type_archive('event') {
This evaluates to true if the URL is:
http://localhost:8886/jeanmonnetprojects.au/event
But is false when I have a get parameter:
http://localhost:8886/jeanmonnetprojects.au/event?category=categoryX
I am sure this code was working before and now it's giving me false when I include the GET...any pointers are greatly appreciated.
So I am modifying the main query and basically asking:
if is_post_type_archive('event') {
This evaluates to true if the URL is:
http://localhost:8886/jeanmonnetprojects.au/event
But is false when I have a get parameter:
http://localhost:8886/jeanmonnetprojects.au/event?category=categoryX
I am sure this code was working before and now it's giving me false when I include the GET...any pointers are greatly appreciated.
Share Improve this question asked Aug 14, 2019 at 5:43 csaboriocsaborio 1122 silver badges13 bronze badges1 Answer
Reset to default 0My fault, I had defined the slug as 'events', hence I should have used:
http://localhost:8886/jeanmonnetprojects.au/events?category=categoryX
本文标签: custom post typesisposttypearchive is false when I pass GET parameters in the URL
版权声明:本文标题:custom post types - is_post_type_archive is false when I pass GET parameters in the URL 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745244052a2649473.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论