I’d recommend TurboCSV for importing data to any post type which has ACF fields. It allows you to create templates for field mapping so you can has several different post types and allow a client to upload new data.
I find this particularly useful for clients that have physical branch locations which require updating in bulk, and also have a product catalogue to update.
http://wphostreviews.com/product/turbocsv
Hey
Thanks for the reply.
That helps a little. I now have this filter in place, which as you say, orders the posts by menu_order.
// filter for every field
add_filter('acf/fields/relationship/query', 'my_relationship_query', 10, 3);
function acf_relationship_query( $args, $field, $post )
{
$args['orderby'] = 'menu_order';
return $args;
}
But, this takes the menu_order as is. By this I mean, you would have a root level post with a menu_order of 1. But you also have a child of a root level post also with a menu_order of 1. This means that the posts aren’t in a hierarchical order still.
Using my example in the first post, you would now have:
1/ Electrical Items
1.1/Drills
3.1/ Bricks
1.2/Mowers
2/ Timber
3.2/ Plumbimg
3/ Building Materials
Really what I need to be able to do is create a recursive function that orders the posts under a specific post, and return them in an ordered array?