$post_id = get_var( $post->ID );
$custom_field_value = get_var( get_post_meta( $post->ID, 'custom_field_name', true ) );This example retrieves the value of a custom field named 'custom_field_name'. The get_post_meta function is used to retrieve the value of the custom field from the current post. The retrieved value is then passed as a parameter to get_var to retrieve the value. Package/Library: WordPress Core