Find answers, ask questions, and connect with our
community around the world.

Forums Forums Web Design WordPress How can I loop Custom post types inside of Custom post types?

  • How can I loop Custom post types inside of Custom post types?

    updated 11 months, 3 weeks ago 0 Member · 1 Post
  • SharonP

    Member
    December 8, 2021 at 2:58 am

    Hi /r/wordpress! I have 3 custom post types: Projects (has a project ID) Project skills (contains a project ID and a Skills ID) Skills (has a skills ID) So in essence we have a many to many relation (projects & skills) that has a Project skills CPT in between to make it 2 one to many relations. You can question this setup, but that is for another day. I know that in the single-project.php I have to loop the project skills with a filter for project ID. Then for each project skill that has the project id, I have to loop through all the skills and filter on the Skills ID. ​ Can I loop inside of that loop without issues? Does somebody have an example of this? ​ Thanks! – by /hq/thibaultdp – –

Viewing 1 of 1 replies
Reply to: SharonP
Your information:

Cancel
Original Post
0 of 0 posts June 2018
Now