Closed jirodearmas closed 5 years ago
Hi,
please try…
if ( is_array( $table['header'] ) and count( $table['header'] ) > 0 ) {
instead of…
if ( $table['header'] ) {
Hi,
Replaced the line with the one you send. And now i'm getting error on the second foreach
This line: foreach ( $table['body'] as $tr ) {
Can you help find another way to display table from child pages to a parent page. That's what i'm trying to do with my post above.
replace
$table = get_post_meta($child->ID,'product_table',true);
with
$table = get_field( 'product_table', $child->ID );
I tried to place the table inside a foreach loop and it stops working. Error (Invalid argument supplied for foreach()) is in the line
foreach ( $table['header'] as $th )
Help fix this issue