Here are few ideas how to relate content together in WordPress. Without knowing (and understanding) all the details and requirements it’s difficult to give a complete answer, but these hopefully help you explore different possible solutions.
- Store relation data in CPT post meta. You can then use
WP_Query
with
meta parameters to find matching posts - Manage relations with
post_parent
property ofWP_Post
(it has its own column in DB {prefix}_posts table). Nothing stops you from relating different posts types together like this, if you handle the data saving yourself withwp_update_post()
- Create a custom taxonomy to serve as lists and use CPT as items
- Use CPT as list and store list items as serialized array / json in the post’s
post_content
property - Skip CPTs altogether, store everything in custom DB tables and manage data with
$wpdb
P.s. please note that these kind of open questions usually don’t have a single definite answer, but recieve many opinion-based answers each with many ifs, buts and maybes, and your question might get closed.