WordPress.org

Support

Support » Plugins and Hacks » How Do I Hook A Meta Box To A Genesis Hook

How Do I Hook A Meta Box To A Genesis Hook

  • Brad Dalton
    Participant

    @wordpresssites

    Here’s the code in my functions.php file

    add_action( 'genesis_after_post_title', 'custom_field_before_content' );
    function custom_field_before_content() {
    if(is_page() || is_single() ) {
      genesis_custom_field('second_image');
    
      }
    
    }
    
    I have created the custom field and meta box for a 2nd featured image but it doesn't connect to the meta box.menazing I have to use the default WordPress custom field value every time I want to add it in the genesis_after_post_title hook position.
    
    I am using second_image as the file name when creating the met box.
    
    What am I doing wrong?

    http://wordpress.org/extend/plugins/advanced-custom-fields/

  • The topic ‘How Do I Hook A Meta Box To A Genesis Hook’ is closed to new replies.