创世记和自定义元框

I have been using WPAlchemy for my custom meta boxes. I can usually get the meat box values to display using something like <?php $custom_mb->the_value('summary'); ?> but I am having trouble displaying the data in a genesis child theme. If use the above example I can get the post to display but it is at the very top of the page, even above the header. So I attempted to hook into the genesis_post_content hook using this

 add_action('genesis_post_content', 'meta_content');
function meta_content() { 
echo "Hello World";
}

I can echo Hello World this way but receive errors when trying the first example in the function. Any help would be greatly appreciated.

I do not know Genesis and I do not use WPAlchemy ( I avoid "frameworks" like fire ) but my logic dictates that if you can see the value at the top of the page like you described ( above header ) than the method the_value() is doing a direct echo, where you would need a return value.

The internal wordpress core logic dictates that whenever you have an echo function ( e.g. the_title() ) you would potentially have an equivalent return function ( e.g. get_the_title() ) and it would get the same function name with an added get_ prefix.

If the same wordpress logic is applied to those "frameworks" , or in this case to the WPAlchemy class , so instead of

$custom_mb->the_value('summary'); // if this is direct echo

you should be able to do :

$custom_mb->get_the_value('summary'); // then this should be return

Note that I did not tested it ( not using those "frameworks" , remember ?? ) but if it is indeed the case with WPAlchemy , than you would not need to invoke the genesis filter ( which by itself seems a bit wrong becasue the_content filter should be about the_content and not about meta_data but not knowing genesis I can not really say )