I want to add a CPT to be shown in the blog. I figured out that I can use the filter hook pre_get_post to get the query object and I can modify it. However just adding another post type to the loop is easily done. But I need to add only specific posts of my CPT which belong to a certain custom taxonomy.


I have the CPT shows and I have a custom taxonomy series. Each show can belong to no, one or many series.

-> show1 belongs to series1
-> show2 belongs to series2
-> show3 belongs to series1, series2
-> show4 belongs to no series

I need now to extend the normal blog loop such that shows of series1 and/or series2 are also listed in the blog.

So in the example either show1 and show3 are listed, or show2 and show3, or show1,show2, and show3, but never show4.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.