Hi, Thank you already....
could you please describe to me what it is exactly i need to comment?
That deleting part wasn't a problem...
if ($meta_box['name'] == 'fs-link') {
$attachments = array_merge(
get_children(array(
'post_type' => 'page',
'post_parent' => null,
)),
get_children(array(
'post_type' => 'post',
'post_parent' => null,
))
);
$posts = '';
foreach ($attachments as $attachment) {
$permalink = get_permalink($attachment->ID);
$posts .= '<option value="'.$permalink.'"';
if (get_post_meta($post->ID, $meta_box['name'], true) != '' && (get_post_meta($post->ID, $meta_box['name'], true) == $attachment->guid || get_post_meta($post->ID, $meta_box['name'], true) == $permalink)) $posts.= ' selected="selected"';
$posts .= '>'.$attachment->post_title.'</option>';
}
if (get_post_meta($post->ID, $meta_box['name'], true) == '')
$posts = '<option value="" disabled="disabled" selected="selected">'.__('Choose a page on this blog').'</option>'.$posts;
echo '<select onchange="document.getElementById(\''.$meta_box['name'].'\').value = this.options[this.selectedIndex].value">'.$posts.'</select>';
}
echo '<input type="text" name="'.$meta_box['name'].'" id="'.$meta_box['name'].'" value="'.str_replace('"','\"',get_post_meta($post->ID, $meta_box['name'], true)).'" style="width: 100%" /><br />';
echo '<p><label for="'.$meta_box['name'].'">'.$meta_box['description'].'</label></p>';
?> </td>
</tr>
This is the code as it is right now