• I’m working on a WP-based Project/Staff database. I registered custom post types for both Projects and Resumes. They are both using the same standard categories, because I didn’t want to register unique taxonomies for each. My categories for Project are set up like this: parent is ‘Project Type’ with children ‘Higher Education’ and ‘K-12’ etc. For Staff, the parent is ‘Staff’ and the children are ‘Joe Smith’ and ‘Mary Jones’ etc. For a particular Project post ‘My Project 1’, I would check the child categories such as ‘Higher Education’ and ‘Mary Jones’. For a Resume post for Mary Jones I would only check the child category of ‘Mary Jones’. What I want to output on Mary Jones’ page (single-resume.php) I want to list all the project that just she worked on. So all the Projects posts where the children of ‘Project Type’ AND the current child category of ‘Mary Jones’ are checked. The result would be:
    Higher Education
    Project 1
    (the_excerpt)
    Project 2
    (the_excerpt)
    K-12
    Project 3
    (the_excerpt)

    And so on. To recap, on my single-resume.php, I only want to list the posts for the current child category only if the current child category AND any child category of Project Type are both checked. I would appreciate any help on this. Thanks in advance!

Viewing 1 replies (of 1 total)
  • Thread Starter jasonisfast

    (@jasonisfast)

    Any help? I want to match up projects with the staff member who worked on them. Maybe there’s a better way?

Viewing 1 replies (of 1 total)
  • The topic ‘List posts only if in current category and child of another category’ is closed to new replies.