Default Post type having custom field
// Display custom content. add_action('genesis_before_entry_content', 'gk_default_custom_content', 5); function gk_default_custom_content() { if ( ! is_singular( 'post' ) ) { return; } echo '<div class="Custom-content"><h2>Custom Field Content</h2>'; echo genesis_get_custom_field('some_random_content'); echo '</div>'; }
Custom Post Type having Custom field
// Display custom content. add_action('genesis_before_comments', 'gk_custom_cpt_content', 5); function gk_custom_cpt_content() { if ( ! is_singular( 'book' ) ) { return; } echo '<div class="cpt-content">'; echo genesis_get_custom_field('custom_content'); echo '</div>'; }