jon-b
8/17/2014 - 11:06 PM

Using flexible content from ACF without ACF functions.

Using flexible content from ACF without ACF functions.

<?php

$rows = get_post_meta( get_the_ID(), 'be_content', true );
foreach( $rows as $count => $row ) {
	switch ( $row ) {
		
		
		case 'type_1':
		$content = get_post_meta( get_the_ID(), 'be_content_' . $count . '_field_name', true );
		echo '<div class="type-one">' . wpautop( $content ) . '</div>;
		break;
		
		case 'type_2':
		$content = get_post_meta( get_the_ID(), 'be_content_' . $count . '_field_name', true );
		echo '<div class="type-two">' . wpautop( $content ) . '</div>';
		break;
		
	}
}