Posts 2 Posts
[resolved] Is this the plugin I need? (4 posts)

  1. Twentyfourten
    Posted 3 years ago #


    What I'm looking for doesn't sound difficult, but cannot find a 'relationship' plugin anywhere that allows what I need;

    Two Custom Post Types exist ('Guitarists' and 'Drummers')
    Custom Taxonomy ('Location') allows post to be assigned against hierarchical terms e.g. 'France' (parent term) 'Paris' (child term).

    If a post is about a 'Guitarist' in 'Paris' I want to be able to show 'Drummers nearby ....' and list the CPT of 'Drummers' in that same Taxonomy child term.

    would appreciate opinions on if achievable with posts 2 posts?



  2. scribu
    Plugin Author

    Posted 3 years ago #

    Better SETUP:

    One custom post type: 'musician' and two taxonomies: 'Musician Type' ('guitarist', 'drummer' etc.) and 'Location' ('France', 'Paris' etc.).

    Then, you don't need P2P, just some fancy taxonomy queries. Maybe the Query Multiple Taxonomies plugin would help.

  3. Twentyfourten
    Posted 3 years ago #

    Thanks scribu,

    An early obstacle to your SETUP improvement, is that 'Drummer' and 'Guitarist' utilize different Custom Fields, which make them naturally feel as though they definitely should be two different Types of Post, it's not the 'classification' which only makes them different, it's their content.

    I will definitely consider your suggestion, and think through if it could be applied.

    If however (as I'm thinking at this stage) there needs to be two CPT and SETUP was unchanged, any ideas of still achieving the GOAL?
    And of course if P2P was a possible enabler.

  4. scribu
    Plugin Author

    Posted 3 years ago #

    Well, as long as you don't need to directly connect drummers to guitarists, I don't see why you'd need P2P. You can filter by both location and post type in the same query. Read the tutorial I linked to above and on WP_Query in general.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Posts 2 Posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic