We have a use case where our blog articles use several categories (1-4 items). However, there will always be 1 specific category chosen from a group of 6. The categories are not nested.
For instance:
Blog 1 -|Get Wise|Faith, Growth, Bible|
Blog 2 -|Get Wise|Worship, Inspiration, Purpose|
Blog 3 -|Get Focused|Bible, Growth, Inspiration|
Blog 4 -|Get Focused|Bible, Growth, Inspiration|
Blog 5 -|Get Focused|Leadership, Culture, Growth, Purpose|
I suppose I can build a section for each of these main “Get …” categories and use conditions to turn them on/off based on the presence of the specific “Get…” category for that specific post. So so in order to do this would I need to create a custom looper based on the categories in that post?
I know that I can do a custom query:
category_name={{dc:term:slug}}&post_type=post&posts_per_page=3&offset=0&ignore_sticky_posts=1&post__not_in%5B0%5D={{dc:post:id}}
But how would I extract the IDs of all the categories in a post and verify that a specific ID is in the post with multiple categories?