• Hello,

    I have an issue using P2P to connect 2 different CPTs. I tried to connect between ‘person’ and ‘directory’. But the search box (when editing the post_type, say person) only show list of Post, rather than the actual CPT. This is my code:

    function my_connection_types() {
    p2p_register_connection_type( array(
    ‘name’ => ‘posts_to_pages’,
    ‘from’ => ‘person’,
    ‘to’ => ‘directory’,
    ) );
    }
    add_action( ‘p2p_init’, ‘my_connection_types’ );

    And when I tried to create the connection anyway, the error came up as “Invalid second parameter.”

    If I go edit a “person” post, shouldn’t the search box display all “directory” posts instead of the “post” posts?

    I did some test by changing ‘to’ => ‘directory’, to ‘to’ => ‘page’, and it still the same issue.

    Only if I change the post_type in “to” post or user then it work normally (display and connect correctly).

    Did I do something wrong?

    Note: the CPT I created with Types plugin.

    Thanks for your help in advance!

    https://wordpress.org/plugins/posts-to-posts/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello unfortunatly I cannot tell you any solution but I am experiencing the same problem with WP 4.0 and higher with a lot of sites.

    This is a really serious issue even if the Plugin is not developed any further PLEASE fix it.

    Thread Starter trinhan

    (@trinhan)

    Hi Blackbam, thanks for your information.

    It’s good to know that I’m not the only one who face with this problem. This is such a useful plugin, I hope the author or anyone who has the skill to lend a hand and offer a fix for this.

    This is so important!!!

    Cheers

    any news on that?

    With 4.1 the admin box does not even show up on CPT-edit-page.

    thanks

    Thread Starter trinhan

    (@trinhan)

    No news so far. It’s a pity since this plugin is so useful (and powerful).

    If the author or anyone could see some light into this please let us know.

    Cheers

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘P2P between 2 CPTs issue – Create connection show only from "Post" type.’ is closed to new replies.