Get an array from a relationship field
-
Hi Team of Pods. I’ve a question.
I’m wondering get the raw value of a relationship field with an array my code is:
function ver_assets () { $formacion_assets = pods( 'formacion', get_the_id() ); $argu = array( 'name' => 'assets_activos', 'single' => false, 'raw' => false, 'in_form' => true, 'raw_display' => false, 'display' => false, 'get_meta' => false, 'output' => null, 'deprecated' => false, ); $insertar_assets = $formacion_assets->field( $argu ); echo '<p>' . $insertar_assets . '</p>'; } add_shortcode ('assets_sc', 'ver_assets');The thing is that if a set to true “in_form” the call returns me for example (in this case the relationship field is with a pod, in this case returns me the post id with the in_form): “1234 and 5678” Then I want that returns me “1234, 5678” I really don’t figure it out how to achieve this. Thanks of beforehand.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
The topic ‘Get an array from a relationship field’ is closed to new replies.