• Resolved Anton

    (@ahtolllka)


    I use ACF plugin and some data in Array, how i can show this information?
    i got always text “Array” with
    {cf:sklad}
    {cf:sklad}[0]
    {cf:sklad[0]}
    how i can work with this ?

Viewing 1 replies (of 1 total)
  • Manzoor Wani (a11n)

    (@manzoorwanijk)

    It can be done by custom code:

    /* WP Telegram | Get the custom field value */
    add_filter(
    	'wptelegram_p2tg_post_data_cf:sklad_value',
    	function ( $value, $post ) {
    		$newValue = $value[0];
    		// or you can use ACF functions
    		// $newValue = get_field('sklad', $post->ID);
    		return $newValue;
    	},
    	10,
    	2
    );
Viewing 1 replies (of 1 total)
  • The topic ‘ACF with ARRAY’ is closed to new replies.