Acf image gallery | WordPress.org

[ad_1]

Hello,
Array fields are not supported. The field needs to return a string in order to sent to Telegram.

You can use some custom code to ensure that a string value is returned.

Here is an example that uses the first image of the gallery in place of a featured image

/* WP Telegram - use first image from ACF gallery */
add_filter( 'wptelegram_p2tg_featured_image_source', function ( $url, $post ) {

	$images = get_field( 'model_gallery' );

	if ( ! empty( $images ) ) {
		$first_image = reset( $images );

		$url = is_array( $first_image ) ? $first_image['url'] : wp_get_attachment_url( $first_image );
	};

	return $url;
}, 10, 2 );
/* WP Telegram - use first image from ACF gallery */

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer