WordPress.org

Ready to get started?Download WordPress

Forums

Advanced Custom Fields
How Do I Hook A Meta Box To A Genesis Hook (1 post)

  1. WP Sites - Brad Dalton
    Member
    Posted 1 year ago #

    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/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

  • RSS feed for this topic
  • Started 1 year ago by WP Sites - Brad Dalton
  • This topic is not resolved
  • WordPress version: 3.5.1

Tags