שליפת תוכן של ריפיטר

PHOTO EMBED

Tue May 18 2021 17:09:38 GMT+0000 (UTC)

Saved by @Shesek

function get_repeater_data(){	
		$repeater = get_post_meta(  get_the_ID(), 'repeater_name', true );
					$result = array();
					foreach ($repeater as $item => $repeater_item) {
						foreach ($repeater_item as $field => $value) {
							if ($field == 'repeater_field') {
							array_shift($result, $repeater_item);
								$current = $value;
								array_push($result, $value);
							}
						}
					}
					
					return $result[repeater_index];

		
}
add_shortcode( 'repeater_data', 'get_repeater_data' );
content_copyCOPY