'외과 의사'를위한 사용자 정의 게시 유형을 추가하려고합니다. 불행히도 6 개의 섹션을 추가해야하는데, 리치 텍스트 여야하고 일반 텍스트가 아닌 이미지 등을 추가해야합니다. 현재 내가 갖고있는 부분입니다.대시 보드의 사용자 지정 게시 유형에 서식있는 텍스트 상자를 추가하려면 어떻게합니까?
나는 모든 일반 텍스트 필드가 잘 작동하지만 이제는 모든 리치 텍스트를 추가해야합니다.
는
function personal_meta() {
global $post;
$custom = get_post_custom($post->ID);
$email = $custom["email"][0];
$phone = $custom["phone"][0];
$address = $custom["address"][0];
$website = $custom["website"][0];
?>
<p><label>Email:</label><br />
<input type="text" name="email" value="<?php echo $email; ?>" /></p>
<p><label>Phone - with extension. i.e. (805) 555-2323 Ext 234</label><br />
<input type="text" name="phone" value="<?php echo $phone; ?>" /></p>
<p><label>Address:</label><br />
<textarea cols="50" rows="4" name="address"><?php echo $address; ?></textarea></p>
<p><label>Website - BEGINNING WITH http://</label><br />
<input type="text" name="website" value="<?php echo $website; ?>" /></p>
<?php
}
이를 heres 코드를 저장하는 백엔드 다양한 구조를 설정
ADD_ACTION ('save_post', 'save_details'); <p>
및 <br>
태그 (되지 않은 다른 사람을) 빼내야하지만
<textarea class="theEditor" cols="50" rows="4" name="address">
<?php echo $address; ?>
</textarea>
:
function save_details(){
global $post;
update_post_meta($post->ID, "email", $_POST["email"]);
update_post_meta($post->ID, "phone", $_POST["phone"]);
update_post_meta($post->ID, "address", $_POST["address"]);
update_post_meta($post->ID, "website", $_POST["website"]);
}
3 년 후 ...... 감사합니다. – Tallboy