Quantcast
Channel: Toolset » All Posts
Viewing all articles
Browse latest Browse all 20145

How to get the first field value from a reordered repeating field from back-end

$
0
0

I have a repeating field which contains various images that might be reordered by drag and drop by the end-user in the back-end.

I have to retrieve the first field value from the back-end, so I guess I cannot use the Types API, or can I?

Using the WordPress API I can use:

$repeating_field_values = get_post_meta( $post_id, 'wpcf-repeating-field', false );

… to get all the values, but the problem is they might not be in the order the end-user choose by dragging and dropping them in the back-end.

So my question is: how can I get the first field value respecting the custom order using the WordPress API?

Thanks


Viewing all articles
Browse latest Browse all 20145

Trending Articles