WordPress.org

Ready to get started?Download WordPress

Forums

Posts 2 Posts
[resolved] Connect more then one custom post type (4 posts)

  1. bjdj
    Member
    Posted 3 years ago #

    I use the following code to connect post type X with both post type Y and Z.

    p2p_register_connection_type( 'X' , 'Y' );
    p2p_register_connection_type( 'X' , 'Z' );

    This worked like a charm in version 0.3. Now, I updated to version 0.4-alpha5 and it doesn't work like expected. Only the last connected post type is shown (and connected?) in the post edit screen of post type X.

    So in the above example, there is no box to connect to posts of type Y, only a box to connect to posts of type Z. If I switch the two lines of code the box is shown to connect posts of type Y, but not of type Z. I think both should show up.

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

  2. scribu
    Member
    Plugin Author

    Posted 3 years ago #

  3. bjdj
    Member
    Posted 3 years ago #

    scribu, thank you for your quick fix. Works like a charm.

    Two remaining questions;

    - Is it normal behaviour that all connections between posts disappeared when updating to 0.4-alpha5? If not, how can I preserve them?
    - Is it possible to contribute to this plugin?

  4. scribu
    Member
    Plugin Author

    Posted 3 years ago #

    - Is it normal behaviour that all connections between posts disappeared when updating to 0.4-alpha5? If not, how can I preserve them?

    It's expected behaviour, since I didn't write the code to migrate them yet.

    - Is it possible to contribute to this plugin?

    You mean with code? Yes. Feel free to email patches etc. to scribu@gmail.com

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic