I'm trying to set up a fat footer using a theme action in my child theme functions.php file but I keep getting the error: 'Warning: Invalid argument supplied for foreach() in...' I've used the #block-3 custom field snippet below in other page templates just fine, and can't seem to figure out what's going on here. I'm using the Custom Fields Template plugin on WP 2.8.3.
<?php
function amalgamis_fat_footer() { ?>
<div id="block-3" class="content-box">
<h2>Block #3</h2>
<div class="entry">
<?php
$block = get_post_meta($post->ID, 'Block #3');
foreach(($block) as $blocks) {
echo $blocks;
}
?>
</div><!-- /.entry -->
</div><!-- /#block-3 -->
<?php }
add_action('thematic_abovefooter', 'amalgamis_fat_footer');
?>