Support » Plugin: Posts 2 Posts » [Plugin: Posts 2 Posts] Multiple P2P metaboxes

  • Resolved superwillyfoc

    (@superwillyfoc)


    Hi,
    I have 2 post types which I want to be related using Posts 2 Posts. In the “A” post type I need to have two metaboxes, where the editor can check some “B” post types in both metaboxes. I need it because I want to display the related “B” types in the “A” template in two different blocks.
    Is it possible with the actual P2P API?

    http://wordpress.org/extend/plugins/posts-to-posts/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author scribu

    (@scribu)

    I need it because I want to display the related “B” types in the “A” template in two different blocks.

    Could you be more specific? What is the criteria for differentiating between the two blocks?

    superwillyfoc

    (@superwillyfoc)

    Hi Scribu,
    thanks for your reply. I mean something like this:

    As an example, I have the post type “Landing” and the post type “Album”. I need that the user could choose some “albums” in two different metaboxes while editing a “landing” post type. I think I need it, because in the template (frontend) there should be two different blocks showing both manual selections.

    Plugin Author scribu

    (@scribu)

    The cleanest way would be to create 2 distinct connection types, between the same post types:

    p2p_register_connection_type( array(
      'name' => 'other_albums',
      'from' => 'album',
      'to' => 'landing'
    ) );
    
    p2p_register_connection_type( array(
      'name' => 'recommended_albums',
      'from' => 'album',
      'to' => 'landing'
    ) );
    superwillyfoc

    (@superwillyfoc)

    Thank you very much!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Posts 2 Posts] Multiple P2P metaboxes’ is closed to new replies.