Support

Account

Home Forums General Issues Exported PHP register_field_group location variables Reply To: Exported PHP register_field_group location variables

  • This problem can be solved by doing this…

    
    function pass_post_id_as_string() {
      global $post;
      $post_id = $post-> ID;
      $post_id_as_string = (string)$post_id;
      return $post_id_as_string;
    }
    add_action('wp_head', 'pass_post_id_as_string');
    

    in the location part of the array (see above) set the value as the function.