Custom Field Outputs Array instead of actual content
-
This has become frustrating for me. I’ve created a custom field with meta box for a subhead line that goes underneath a page title. I’m using this code to output the text within the page I’m editing.
<?php $subhead = get_post_meta($post->ID, 'subheadline', true); if($subhead) { echo '<p>' . $subhead . '</p>'; } ?>
Instead of the subhead line outputting, the only text that shows up is “array” is this code correct? What am I doing wrong?
Oddly enough, I can use default custom field and it will output just fine.
https://www.ads-software.com/extend/plugins/wck-custom-fields-and-custom-post-types-creator/
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Custom Field Outputs Array instead of actual content’ is closed to new replies.