how can i remove a field from appearing on single/ads post
how do i remove a particular field ..say "city" from appearing on the ads / single page!
I want the same to be submitted while posting the ads but i dont want it to appear on the ads page!
How do i do this !
I was playing with theme-function.php
but couldnt find a way to stop the field from appearing on the ads page!
please somebody help me out !
Thanks
------------------------------------------------
$results = $wpdb->get_results($sql);
if($results) {
if($locationOption == 'list') {
foreach ($results as $result) :
// now grab all ad fields and print out the field label and value
$post_meta_val = get_post_meta($postid, $result->field_name, true);
if (!empty($post_meta_val))
if($result->field_name != 'cp_price' && $result->field_type != "text area")
echo '<li id="'. $result->field_name .'"><span>' . $result->field_label . ':</span> ' . cp_make_clickable($post_meta_val) .'</li>'; // make_clickable is a
WP function that auto hyperlinks urls
endforeach;
}
elseif($locationOption == 'content')
{
foreach ($results as $result) :
// now grab all ad fields and print out the field label and value
$post_meta_val = get_post_meta($postid, $result->field_name, true);
if (!empty($post_meta_val))
if($result->field_name != 'cp_price' && $result->field_type == 'text area')
echo '<div id="'. $result->field_name .'" class="custom-text-area dotted"><h3>' . $result->field_label . '</h3>' . cp_make_clickable($post_meta_val) .'</div>'; // make_clickable is a
WP function that auto hyperlinks urls
endforeach;
}
else
{
// uncomment for debugging
// echo 'Location Option Set: ' . $locationOption;
}
} else {
echo __('No ad details found.', 'cp');
}
}
}
--------------------------------------------------------
Last edited by pepsi; August 17th, 2010 at 01:35 AM.