ACF: Table Fields after update broken
-
Hey there,
my acf table fields plugin is broken since I made updates on WordPress core (4.7), acf(4.4.11) and acf:table fields(1.1.13). It actually says on the frontpage:
Notice: Trying to get property of non-object in /homepages/27/d559574883/htdocs/dev/wp-content/themes/mondopazzo/frontpage.php on line 97
The output of every line in this table is showing up like this. Before this error message there is showing up another table which looks good but is not related to this post_id. Very weird.
I made the usual troubleshooting.
The code looks like this:
<?php // The Query $the_query = new WP_Query('post_id=106'); // The Loop if ( $the_query->have_posts() ) { while ( $the_query->have_posts() ) { $the_query->the_post(); $table = get_post_meta(get_the_ID(), 'speisekarte_tabelle', true); $table = json_decode($table); echo '<ul class="pplan">'; foreach($table->b AS $row => $key) { echo '<li><span>'.$key->{'0'}->c.'</span><div>'.$key->{'1'}->c.'</div></li>'; } echo '</ul>'; } } else { // no posts found } /* Restore original Post Data */ wp_reset_postdata(); ?>
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘ACF: Table Fields after update broken’ is closed to new replies.