• Hi I have made some P2P connection in the backend of my custom post type pages. It was for team members.

    but as per the positions/departments I need them in specific order. Even if I can make it no-order or delete all and then add as per order it still show me in alphabetical order.

    I want it to be drag n drop if possible or no-order, like as we add them.

    Here is the code:

    function my_connection_types_legalupdates() {
        p2p_register_connection_type( array(
            'name' => 'practices_to_legalupdates',
            'from' => 'practices',
    		'to' => 'legalupdates',
    		'admin_box' => 'to'
        ));
    }
    add_action( 'p2p_init', 'my_connection_types_legalupdates' );

    please help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    A post’s “menu_order” field can be used to specify a specific order, but you’ll still get alphabetical unless the related query is changed to order by this field. Alternately, you could assign a custom field value to use as ordering, but “menu_order” will be much more efficient when a large DB is involved.

    You’d still need to manually assign values unless a UI is built to allow for drag and drop functionality. Your P2P plugin might have a better solution. I suggest asking in their dedicated support channel for advice.

    Thread Starter sumeetwork

    (@sumeetwork)

    Thank you @bcworkz, I’ll try and look if the plugin support helps. Also, will try your solution.

    Regards

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Drag/drop or reordering connections P2P’ is closed to new replies.