Custom Fields not working on frontend

Hi,

I am adding new custom fields in the site using Custompress. All custom fields I created did display in the admin "Add New Listing" since I'm also using the Directory plugin for listing. The problem is when I go to the "Add Listing" page in the frontend, all custom fields I created aren't displaying but I can see in the code something like this "
<?php
global $post, $CustomPress_Content_Types, $CustomPress_Core;

if ( isset( $CustomPress_Content_Types ) ): ?>
<div class="editfield">
<?php
$post->post_type = 'directory_listing';
$post->ID = $listing_data['ID'];
$CustomPress_Content_Types->display_custom_fields();//( 'display-custom-fields', array( 'type' => 'local' ) );
?>
</div>
<?php endif; ?>
What seems to be the problem to get it fixed?

thank you..