워드프레스 초보입니다..
php 스킨에서 겨우겨우 항복등을 추가했습니다
그리고
<div class="kboard-attr-row">
<label class="attr-name" for="kboard-select-wordpress-search"><?php echo __('선택', 'kboard')?></label>
<div class="attr-value">
<select id="kboard-select-wordpress-search" name="wordpress_search">
<option value="1"<?php if($content->search == '1'):?> selected<?php endif?>><?php echo __('필수선택', 'kboard')?></option>
<option value="2"<?php if($content->search == '2'):?> selected<?php endif?>><?php echo __('11', 'kboard')?></option>
<option value="3"<?php if($content->search == '3'):?> selected<?php endif?>><?php echo __('22', 'kboard')?></option>
<option value="4"<?php if($content->search == '4'):?> selected<?php endif?>><?php echo __('33', 'kboard')?></option>
<option value="5"<?php if($content->search == '5'):?> selected<?php endif?>><?php echo __('44', 'kboard')?></option>
</select>
</div>
</div>
이렇게 추가를해서 항목을 입력 추가생성했습니다
게시물을 써서 테스트를 했는데
항목추가한것들이 확인이 안됩니다.
그리고 뒤죽박죽 되었습니다..
전체 php소스입니다
<div id="kboard-thumbnail-editor">
<form class="kboard-form" method="post" action="<?php echo $url->getContentEditorExecute()?>" enctype="multipart/form-data" onsubmit="return kboard_editor_execute(this);">
<?php wp_nonce_field('kboard-editor-execute', 'kboard-editor-execute-nonce')?>
<input type="hidden" name="action" value="kboard_editor_execute">
<input type="hidden" name="mod" value="editor">
<input type="hidden" name="uid" value="<?php echo $content->uid?>">
<input type="hidden" name="board_id" value="<?php echo $content->board_id?>">
<input type="hidden" name="parent_uid" value="<?php echo $content->parent_uid?>">
<input type="hidden" name="member_uid" value="<?php echo $content->member_uid?>">
<input type="hidden" name="member_display" value="<?php echo $content->member_display?>">
<input type="hidden" name="date" value="<?php echo $content->date?>">
<input type="hidden" name="user_id" value="<?php echo get_current_user_id()?>">
<div class="kboard-attr-row kboard-attr-title">
<label class="attr-name" for="kboard-input-member-display"><?php echo __('제목', 'kboard')?></label>
<div class="attr-value"><input type="text" id="kboard-input-member-display" name="member_display" value="<?php echo $content->member_display?>" placeholder="<?php echo __('제목을입력하세요', 'kboard')?>"></div>
</div>
<div class="kboard-attr-row">
<div class="attr-name"><?php echo __('Options', 'kboard')?></div>
<div class="attr-value">
<label class="attr-value-option"><input type="checkbox" name="secret" value="true" onchange="kboard_toggle_password_field(this)"<?php if($content->secret):?> checked<?php endif?>> <?php echo __('Secret', 'kboard')?></label>
<?php if($board->isAdmin()):?>
<label class="attr-value-option"><input type="checkbox" name="notice" value="true"<?php if($content->notice):?> checked<?php endif?>> <?php echo __('Notice', 'kboard')?></label>
<?php endif?>
</div>
</div>
<?php if($board->use_category):?>
<?php if($board->initCategory1()):?>
<div class="kboard-attr-row">
<label class="attr-name" for="kboard-select-category1"><?php echo __('Category', 'kboard')?>1</label>
<div class="attr-value">
<select id="kboard-select-category1" name="category1">
<option value=""><?php echo __('Category', 'kboard')?> <?php echo __('Select', 'kboard')?></option>
<?php while($board->hasNextCategory()):?>
<option value="<?php echo $board->currentCategory()?>"<?php if($content->category1 == $board->currentCategory()):?> selected<?php endif?>><?php echo $board->currentCategory()?></option>
<?php endwhile?>
</select>
</div>
</div>
<?php endif?>
<?php if($board->initCategory2()):?>
<div class="kboard-attr-row">
<label class="attr-name" for="kboard-select-category2"><?php echo __('Category', 'kboard')?>2</label>
<div class="attr-value">
<select id="kboard-select-category2" name="category2">
<option value=""><?php echo __('Category', 'kboard')?> <?php echo __('Select', 'kboard')?></option>
<?php while($board->hasNextCategory()):?>
<option value="<?php echo $board->currentCategory()?>"<?php if($content->category2 == $board->currentCategory()):?> selected<?php endif?>><?php echo $board->currentCategory()?></option>
<?php endwhile?>
</select>
</div>
</div>
<?php endif?>
<?php endif?>
<?php if($board->viewUsernameField()):?>
<div class="kboard-attr-row">
<div class="kboard-attr-row">
<label class="attr-name" for="kboard-input-password"><?php echo __('비밀번호', 'kboard')?></label>
<div class="attr-value"><input type="password" id="kboard-input-password" name="password" value="<?php echo $content->password?>" placeholder="<?php echo __('필수입력', 'kboard')?>"></div>
</div>
<div class="kboard-attr-row">
<label class="attr-name" for="kboard-input-title"><?php echo __('작성자', 'kboard')?></label>
<div class="attr-value"><input type="text" id="kboard-input-title" name="title" value="<?php echo $content->title?>" placeholder="<?php echo __('별명입력', 'kboard')?>"></div>
</div>
<div class="kboard-attr-row">
<label class="attr-name" for="kboard-input-member-display"><?php echo __('휴대폰번호', 'kboard')?></label>
<div class="attr-value"><input type="text" id="kboard-input-member-display" name="member_display" value="<?php echo $content->member_display?>" placeholder="<?php echo __('상담가능한 번호', 'kboard')?>"></div>
</div>
<div class="kboard-attr-row">
<label class="attr-name" for="kboard-select-wordpress-search"><?php echo __('월급', 'kboard')?></label>
<div class="attr-value">
<select id="kboard-select-wordpress-search" name="wordpress_search">
<option value="1"<?php if($content->search == '1'):?> selected<?php endif?>><?php echo __('필수선택', 'kboard')?></option>
<option value="2"<?php if($content->search == '2'):?> selected<?php endif?>><?php echo __('100만원 이하', 'kboard')?></option>
<option value="3"<?php if($content->search == '3'):?> selected<?php endif?>><?php echo __('200만원 이하', 'kboard')?></option>
<option value="4"<?php if($content->search == '4'):?> selected<?php endif?>><?php echo __('300만원 이하', 'kboard')?></option>
<option value="5"<?php if($content->search == '5'):?> selected<?php endif?>><?php echo __('300만원 이상', 'kboard')?></option>
</select>
</div>
</div>
<div class="kboard-attr-row">
<label class="attr-name" for="kboard-input-member-display"><?php echo __('직장이 있습니까?', 'kboard')?></label>
<div class="attr-value"><input type="text" id="kboard-input-member-display" name="member_display" value="<?php echo $content->member_display?>" placeholder="<?php echo __('예 / 아니요', 'kboard')?>"></div>
</div>
<?php else:?>
<input style="display:none" type="text" name="fake-autofill-fields">
<input style="display:none" type="password" name="fake-autofill-fields">
<!-- 비밀글 비밀번호 필드 시작 -->
<div class="kboard-attr-row secret-password-row"<?php if(!$content->secret):?> style="display:none"<?php endif?>>
<label class="attr-name" for="kboard-input-password"><?php echo __('Password', 'kboard')?></label>
<div class="attr-value"><input type="password" id="kboard-input-password" name="password" value="<?php echo $content->password?>" placeholder="<?php echo __('Password', 'kboard')?>..."></div>
</div>
<!-- 비밀글 비밀번호 필드 끝 -->
<?php endif?>
<?php if($board->useCAPTCHA() && !$content->uid):?>
<?php if(kboard_use_recaptcha()):?>
<div class="kboard-attr-row">
<label class="attr-name"></label>
<div class="attr-value"><div class="g-recaptcha" data-sitekey="<?php echo kboard_recaptcha_site_key()?>"></div></div>
</div>
<?php else:?>
<div class="kboard-attr-row">
<label class="attr-name" for="kboard-input-captcha"><img src="<?php echo kboard_captcha()?>" alt=""></label>
<div class="attr-value"><input type="text" id="kboard-input-captcha" name="captcha" value="" placeholder="<?php echo __('CAPTCHA', 'kboard')?>..."></div>
</div>
<?php endif?>
<?php endif?>
<div class="kboard-content">
<?php if($board->use_editor):?>
<?php wp_editor($content->content, 'kboard_content', array('media_buttons'=>$board->isAdmin(), 'editor_height'=>400))?>
<?php else:?>
<textarea name="kboard_content" id="kboard_content"><?php echo $content->content?></textarea>
<?php endif?>
</div>
<div class="kboard-attr-row">
<label class="attr-name"><?php echo __('Photos', 'kboard')?></label>
<div class="attr-value">
<a href="#" onclick="kboard_editor_open_media();return false;"><?php echo __('KBoard Add Media', 'kboard')?></a>
</div>
</div>
<div class="kboard-attr-row">
<label class="attr-name" for="kboard-input-thumbnail"><?php echo __('Thumbnail', 'kboard')?></label>
<div class="attr-value">
<?php if($content->thumbnail_file):?><?php echo $content->thumbnail_name?> - <a href="<?php echo $url->getDeleteURLWithAttach($content->uid);?>" onclick="return confirm('<?php echo __('Are you sure you want to delete?', 'kboard')?>');"><?php echo __('Delete file', 'kboard')?></a><?php endif?>
<input type="file" id="kboard-input-thumbnail" name="thumbnail">
</div>
</div>
<?php if($board->meta->max_attached_count > 0):?>
<!-- 첨부파일 시작 -->
<?php for($attached_index=1; $attached_index<=$board->meta->max_attached_count; $attached_index++):?>
<div class="kboard-attr-row">
<label class="attr-name" for="kboard-input-file<?php echo $attached_index?>"><?php echo __('Attachment', 'kboard')?><?php echo $attached_index?></label>
<div class="attr-value">
<?php if(isset($content->attach->{"file{$attached_index}"})):?><?php echo $content->attach->{"file{$attached_index}"}[1]?> - <a href="<?php echo $url->getDeleteURLWithAttach($content->uid, "file{$attached_index}");?>" onclick="return confirm('<?php echo __('Are you sure you want to delete?', 'kboard')?>');"><?php echo __('Delete file', 'kboard')?></a><?php endif?>
<input type="file" id="kboard-input-file<?php echo $attached_index?>" name="kboard_attach_file<?php echo $attached_index?>">
</div>
</div>
<?php endfor?>
<!-- 첨부파일 끝 -->
<?php endif?>
<div class="kboard-attr-row">
</div>
</div>
<div class="kboard-control">
<div class="left">
<?php if($content->uid):?>
<a href="<?php echo $url->set('uid', $content->uid)->set('mod', 'document')->toString()?>" class="kboard-thumbnail-button-small"><?php echo __('Back', 'kboard')?></a>
<a href="<?php echo $url->set('mod', 'list')->toString()?>" class="kboard-thumbnail-button-small"><?php echo __('List', 'kboard')?></a>
<?php else:?>
<a href="<?php echo $url->set('mod', 'list')->toString()?>" class="kboard-thumbnail-button-small"><?php echo __('Back', 'kboard')?></a>
<?php endif?>
</div>
<div class="right">
<?php if($board->isWriter()):?>
<button type="submit" class="kboard-thumbnail-button-small"><?php echo __('Save', 'kboard')?></button>
<?php endif?>
</div>
</div>
</form>
</div>
<script type="text/javascript" src="<?php echo $skin_path?>/script.js?<?php echo KBOARD_VERSION?>"></script>
작성자는 ->직장, 내용은->제목, 제목->작성자로 가있습니다
답변부탁드리겠습니다..ㅠ
기존 필드는 수정하지 마시고 그대로 두셔야 하는데 기존 필드를 복사하거나 수정하셔서 꼬이게 되었군요.
우선 그냥 원래대로 돌리셔야 할 듯합니다.
원래대로 돌린 다음 list.php 파일에 아래 코드를 추가해보세요.
/wp-content/plugins/kboard/skin/사용중인스킨/list.php 파일입니다.
<div class="kboard-attr-row">
<label class="attr-name">휴대폰번호</label>
<div class="attr-value"><input type="text" name="kboard_option_phone" value="<?php echo $content->option->phone?>" placeholder="상담가능한 번호" required></div>
</div>
<div class="kboard-attr-row">
<label class="attr-name">월급</label>
<div class="attr-value">
<select name="kboard_option_salary" required>
<option value="">필수선택</option>
<option value="100만원 이하"<?php if($content->option->salary == '100만원 이하'):?> selected<?php endif?>>100만원 이하</option>
<option value="200만원 이하"<?php if($content->option->salary == '200만원 이하'):?> selected<?php endif?>>200만원 이하</option>
<option value="300만원 이하"<?php if($content->option->salary == '300만원 이하'):?> selected<?php endif?>>300만원 이하</option>
<option value="300만원 이상"<?php if($content->option->salary == '300만원 이상'):?> selected<?php endif?>>300만원 이상</option>
</select>
</div>
</div>
<div class="kboard-attr-row">
<label class="attr-name">직장이 있습니까?</label>
<div class="attr-value"><input type="text" name="kboard_option_job" value="<?php echo $content->option->job?>" placeholder="예 / 아니요" required></div>
</div>
그리고 document.php 파일에 아래 코드를 추가하면 내용을 출력할 수 있습니다.
/wp-content/plugins/kboard/skin/사용중인스킨/document.php 파일입니다.
<p>휴대폰번호:<?php echo $content->option->phone?></p>
<p>월급:<?php echo $content->option->salary?></p>
<p>직장이 있습니까?:<?php echo $content->option->job?></p>
FTP로 접속해서 파일을 다운 받아 에디터 프로그램으로 편집하시는게 좋습니다.
FTP 추천 : 파일질라 https://filezilla-project.org/download.php?type=client
에디터 프로그램 추천 : Notepad++ https://notepad-plus-plus.org/
모두 무료이며 한글도 지원합니다.
모든분들께 답변드리느라 쉴틈이 없지만, 짬내어 코드도 직접 만들어드렸습니다^^ (원래는 코드까지 다 만들어드리지는 못합니다;;)