드롭다운 형태가 아니라 버튼형으로 나열하고자 합니다. 도움 주세요~^^
네!~ 노고에 늘 감사합니다.
커뮤니티에서 코드를 만들어달라는 요청은 가급적 자제를 부탁드리며 유료 기술지원으로 요청해주시길 부탁드립니다.
고맙습니다.
안녕하세요~^^
KBoard 플러그인과 포럼원 게시판 스킨이 최신 버전이라면
FTP로 접속해서 /wp-content/plugins/kboard/skin/forum-one/list-category-default.php 파일에
아래의 코드를
<div class="kboard-category">
<form id="kboard-category-form-<?php echo $board->id?>" method="get" action="<?php echo $url->toString()?>">
<?php echo $url->set('pageid', '1')->set('category1', '')->set('category2', '')->set('target', '')->set('keyword', '')->set('mod', 'list')->toInput()?>
<?php if($board->initCategory1()):?>
<select name="category1" onchange="jQuery('#kboard-category-form-<?php echo $board->id?>').submit();">
<option value=""><?php echo __('All', 'kboard')?></option>
<?php while($board->hasNextCategory()):?>
<option value="<?php echo $board->currentCategory()?>"<?php if(kboard_category1() == $board->currentCategory()):?> selected<?php endif?>><?php echo $board->currentCategory()?></option>
<?php endwhile?>
</select>
<?php endif?>
<?php if($board->initCategory2()):?>
<select name="category2" onchange="jQuery('#kboard-category-form-<?php echo $board->id?>').submit();">
<option value=""><?php echo __('All', 'kboard')?></option>
<?php while($board->hasNextCategory()):?>
<option value="<?php echo $board->currentCategory()?>"<?php if(kboard_category2() == $board->currentCategory()):?> selected<?php endif?>><?php echo $board->currentCategory()?></option>
<?php endwhile?>
</select>
<?php endif?>
</form>
</div>
아래의 코드로 교체해보시겠어요?
<div class="kboard-category">
<?php if($board->initCategory1()):?>
<ul class="kboard-category-list">
<li<?php if(!kboard_category1()):?> class="kboard-category-selected"<?php endif?>><a href="<?php echo $url->set('category1', '')->set('pageid', '1')->set('target', '')->set('keyword', '')->set('mod', 'list')->tostring()?>"><?php echo __('All', 'kboard')?></a></li>
<?php while($board->hasNextCategory()):?>
<li<?php if(kboard_category1() == $board->currentCategory()):?> class="kboard-category-selected"<?php endif?>>
<a href="<?php echo $url->set('category1', $board->currentCategory())->set('pageid', '1')->set('target', '')->set('keyword', '')->set('mod', 'list')->toString()?>"><?php echo $board->currentCategory()?></a>
</li>
<?php endwhile?>
</ul>
<?php endif?>
<?php if($board->initCategory2()):?>
<ul class="kboard-category-list">
<li<?php if(!kboard_category2()):?> class="kboard-category-selected"<?php endif?>><a href="<?php echo $url->set('category2', '')->set('pageid', '1')->set('target', '')->set('keyword', '')->set('mod', 'list')->tostring()?>"><?php echo __('All', 'kboard')?></a></li>
<?php while($board->hasNextCategory()):?>
<li<?php if(kboard_category2() == $board->currentCategory()):?> class="kboard-category-selected"<?php endif?>>
<a href="<?php echo $url->set('category2', $board->currentCategory())->set('pageid', '1')->set('target', '')->set('keyword', '')->set('mod', 'list')->toString()?>"><?php echo $board->currentCategory()?></a>
</li>
<?php endwhile?>
</ul>
<?php endif?>
</div>
워드프레스 관리자 -> 외모 -> 사용자 정의하기 -> CSS 입력 필드에
아래의 코드를 추가해보세요.
#kboard-forum-one-list .kboard-category { float: left; padding-bottom: 15px; width: 100%; }
#kboard-forum-one-list .kboard-category select { display: inline; margin: 0 0 5px 0; padding: 0; width: 100%; min-width: 100%; height: 28px; line-height: 28px; font-size: 12px; color: #666666; border-radius: 0; border: 1px solid #f1f1f1; background: white; vertical-align: middle; box-shadow: none; box-sizing: border-box; text-indent: 0; -webkit-appearance: menulist; -moz-appearance: menulist; appearance: menulist; }
#kboard-forum-one-list .kboard-category .kboard-category-list { margin: 0 0 5px 0; padding: 0; list-style: none; border: 0; background-color: #f9f9f9; overflow: hidden; }
#kboard-forum-one-list .kboard-category .kboard-category-list li { display: inline-block; *display: inline; zoom: 1; margin: 0; padding: 0 5px; border: 0; list-style: none; }
#kboard-forum-one-list .kboard-category .kboard-category-list li::before,
#kboard-forum-one-list .kboard-category .kboard-category-list li::after { display: none; }
#kboard-forum-one-list .kboard-category .kboard-category-list li a { display: block; padding: 10px 10px 8px 10px; font-size: 13px; border: 0; border-bottom: 2px solid transparent; text-decoration: none; text-shadow: none; box-shadow: none; color: #515151; }
#kboard-forum-one-list .kboard-category .kboard-category-list li.kboard-category-selected a { font-weight: bold; border-bottom: 2px solid #545861; color: #545861; }
계층형 카테고리의 경우에는 모든 스킨에서 기본적으로 드롭다운(Select Box)으로 설정되어 있습니다.
탭 형식으로 변경하시려면
워드프레스 관리자 -> 외모 -> 테마 편집기 -> functions.php 파일 하단에
아래의 코드를 추가해보시겠어요?
add_filter('kboard_skin_category_type', 'my_kboard_skin_category_type', 10, 3);
function my_kboard_skin_category_type($category_type, $board, $boardBuilder){
$category_type = 'tree-tab';
return $category_type;
}
고맙습니다.