Search posts based on multiple categories WordPress

大兔子大兔子 提交于 2019-12-06 07:15:50

When you are doing something like this

cat=3&cat=7&cat=8

You are constantly redefining the value of $_GET['cat']. So it makes perfect sense that it would end up being the last one - 8.

The syntax for querying multiple categories in wordpress is using a comma

cat=3,7,8
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!