• Resolved mantone

    (@mantone)


    p2p_register_connection_type( array(
            'name' => 'staff_to_staff',
            'from' => 'staff',
            'to' => 'staff',
            'title' => array( 'from' => 'Assisted by', 'to' => 'Assists' ),
            'can_create_post' => false,
            'connected_query' => array(
                'taxonomy_name' => 'position',
                'taxonomy_term' => 'assistant'
            ),
            'admin_box' => array(
                'show' => 'any',
                'context' => 'advanced',
            )
        ) );

    I’ve got a Custom Post type = ‘staff’
    I’ve got a custom Taxonomy = ‘position’
    And i want to ‘position’ terms = ‘assistant’ to show up in the ui.

    This is possible right? Am i totally missing something when using the ‘connected_query’ parameter

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

Viewing 1 replies (of 1 total)
  • Plugin Author scribu

    (@scribu)

    The problem is that you’re passing ‘connected_query’ directly to p2p_register_connection_type() which won’t work.

    ‘connected_query’ is a parameter for WP_Query or get_users().

    And i want to ‘position’ terms = ‘assistant’ to show up in the ui.

    Huh? If you mean “show only posts with ‘position’ => ‘assistant'”, then you can use the ‘p2p_connectable_args’ filter:

    https://github.com/scribu/wp-posts-to-posts/wiki/Admin-box-filters

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: Posts 2 Posts] Usage | Filtering’ is closed to new replies.