WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Posts 2 Posts] adding more than one connection issues (2 posts)

  1. Anointed
    Member
    Posted 4 years ago #

    I tried the following code:

    function my_connection_types() {
        p2p_register_connection_type('movies', 'actors');
        p2p_register_connection_type('movies', 'directors');
        p2p_register_connection_type('movies', 'genres');
    }
    add_action('init', 'my_connection_types', 100);

    This does indeed add all 3 fields to the connections box on the movies admin edit page as expected. However there is one issue with it in that when I assign an actor, director, and genre to a movie, and click publish, only one of the fields is saved.

    Well the fields are actually saved, but only the first one is shown as saved when I click publish, the other fields return to their blank state.

    I can provide a link if necessary for troubleshooting.

    also:
    It would be nice if instead of placing all 3 fields into a single box called connections if I could separate the 3 boxes out so it makes more sense to the user inputting the article.

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

  2. scribu
    Member
    Posted 4 years ago #

    Well the fields are actually saved, but only the first one is shown as saved when I click publish, the other fields return to their blank state.

    Fixed in the development version.

    It would be nice if instead of placing all 3 fields into a single box called connections if I could separate the 3 boxes out so it makes more sense to the user inputting the article.

    That will happen when I code the scalable meta box I mentioned previously.

Topic Closed

This topic has been closed to new replies.

About this Topic