KBoard 카드 갤러리 스킨 사용중입니다.
현재는 셀렉트바 형식인데 버튼식으로 출력되게 하려면 어떻게 하면 되겠습니까
늘 자세한 도움으로 하나씩 만들어가 가고 있습니다. 고맙습니다^^
잘 적용되었습니다. 감사드립니다^^
안녕하세요~^^
카드 갤러리 스킨에서 카테고리는 직접 파일을 수정해주셔야 합니다.
조만간 카드 갤러리와 다른 스킨들도 업데이트할 예정입니다.
현재는 번거로우시겠지만 스킨을 직접 수정 부탁드립니다.
1. FTP로 접속해서 /wp-content/plugins/kboard/skin/card-gallery/list.php 파일에
아래의 코드를 찾아서
<div class="kboard-header">
<?php if($board->use_category == 'yes'):?>
<form id="kboard-search-form" method="get" action="<?php echo $url->set('mod', 'list')->toString()?>">
<?php echo $url->set('pageid', '1')->set('mod', 'list')->toInput()?>
<div class="kboard-category">
<?php if($board->initCategory1()):?>
<select name="category1" onchange="jQuery('#kboard-search-form').submit();">
<option value=""><?php echo __('All', 'kboard')?></option>
<?php while($board->hasNextCategory()):?>
<option value="<?php echo $board->currentCategory()?>"<?php if($_GET['category1'] == $board->currentCategory()):?> selected="selected"<?php endif?>><?php echo $board->currentCategory()?></option>
<?php endwhile?>
</select>
<?php endif?>
<?php if($board->initCategory2()):?>
<select name="category2" onchange="jQuery('#kboard-search-form').submit();">
<option value=""><?php echo __('All', 'kboard')?></option>
<?php while($board->hasNextCategory()):?>
<option value="<?php echo $board->currentCategory()?>"<?php if($_GET['category2'] == $board->currentCategory()):?> selected="selected"<?php endif?>><?php echo $board->currentCategory()?></option>
<?php endwhile?>
</select>
<?php endif?>
</div>
</form>
<?php endif?>
</div>
아래의 코드로 교체해보세요.
<div class="kboard-header">
<?php if($board->use_category == 'yes'):?>
<div class="kboard-category category-mobile">
<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 category-pc">
<?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>
<?php endif?>
</div>
2. 워드프레스 관리자 -> KBoard -> 대시보드 -> 커스텀 CSS 입력 필드에
아래의 코드를 추가해보세요.
#kboard-card-gallery-list .kboard-category { float: left; padding-bottom: 15px; width: 100%; }
#kboard-card-gallery-list .kboard-category.category-mobile { display: none; }
#kboard-card-gallery-list .kboard-category.category-pc { display: block; }
#kboard-card-gallery-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-card-gallery-list .kboard-category .kboard-category-list { margin: 0 0 5px 0; padding: 0; list-style: none; border: 0; background-color: #f9f9f9; overflow: hidden; }
#kboard-card-gallery-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-card-gallery-list .kboard-category .kboard-category-list li::before,
#kboard-card-gallery-list .kboard-category .kboard-category-list li::after { display: none; }
#kboard-card-gallery-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-card-gallery-list .kboard-category .kboard-category-list li.kboard-category-selected a { font-weight: bold; border-bottom: 2px solid #545861; color: #545861; }
@media screen and (max-width: 600px) {
#kboard-card-gallery-list .kboard-category.category-mobile { display: block; }
#kboard-card-gallery-list .kboard-category.category-pc { display: none; }
}
카테고리 쪽은 현재 기본 스킨(avatar, contact-form, customer, default, thumbnail)에
계층형 카테고리를 적용하여 공식 버전으로 업데이트했습니다.
최대한 빠른 시일 내에 카드 갤러리 스킨과 다른 스킨들도 적용하여 업데이트하도록 하겠습니다.
고맙습니다.