The following code, which I found in the forum, adds a category filtering function to the custom post list. This code can correctly filter the single-select taxonomy.
My custom post type, in actual use, the taxonomy is multi-select. When I choose a taxonomy with multiple selections, this code does not work for me.
For example: I have a post A, which belongs to both category ccat011 and category ccat012. When using the following code to filter, a null value is returned. If my post only belongs to the category ccat011, or only belongs to the category ccat012, it can be filtered normally.
Among them, my custom post type slug is: myp02
, and my custom taxonomy slug is: ccat01
I don’t know how to modify the query method so that the code runs correctly. Any help is greatly appreciated.
- Hiện tại chúng tôi có hơn 25 nghìn bài văn mẫu các thể loại.
- Kho tài liệu, đề thi học sinh giỏi các lớp vô cùng phong phú.
- Mỗi ngày cập nhật hơn 100 đề thi chất lượng từ các website bán tài liệu lớn.
Tải đề thi VIP với giá siêu rẻ tại Vip.Dethihsg247.Com