1차 카테고리만 탭형식노출

안녕하세요~!

1차 카테고리만 탭형식노출이 되고

1차 카테고리 클릭하면 2,3,4차는 셀렉트 박스로 노출되었으면 합니다.

 

카테고리트리 <- 입니다.

 

감사합니다.

좋은 정보와 인맥을 동시에, 워드프레스 사용자 단톡방 참여하기
워드프레스 에러 기술지원 서비스 전문가에게 맡기세요
  • 감사합니다~

    적용이 잘되네요!

  • 안녕하세요~^^

    KBoard 플러그인의 계층형 카테고리에서

    1차 카테고리만 탭 형식, 하위 카테고리는 셀렉트 박스로 표시하시려면

    FTP로 접속해서 /wp-content/plugins/kboard/skin/사용중인스킨/list-category-tree-select.php 파일의 코드를

    아래의 코드로 교체해보시겠어요?

    <div class="kboard-tree-category-search">
    	<form id="kboard-tree-category-search-form-<?php echo $board->id?>" method="get" action="<?php echo $url->toString()?>">
    		<?php echo $url->set('pageid', '1')->set('target', '')->set('keyword', '')->set('mod', 'list')->toInput()?>
    		
    		<div class="kboard-tree-category-wrap">
    			<?php $tree_category_list = $board->tree_category->getCategoryItemList()?>
    			<div class="kboard-search-option-wrap-<?php echo $board->tree_category->depth?> kboard-search-option-wrap type-tab">
    				<input type="hidden" name="kboard_search_option[tree_category_<?php echo $board->tree_category->depth?>][key]" value="tree_category_<?php echo $board->tree_category->depth?>">
    				<input type="hidden" name="kboard_search_option[tree_category_<?php echo $board->tree_category->depth?>][value]" value="<?php echo $board->tree_category->getCategoryNameWithDepth($board->tree_category->depth)?>">
    				<ul class="kboard-tree-category">
    					<li<?php if(!$board->tree_category->getCategoryNameWithDepth($board->tree_category->depth)):?> class="kboard-category-selected"<?php endif?>><a href="#" onclick="return kboard_tree_category_search('<?php echo $board->tree_category->depth?>', '')"><?php echo __('All', 'kboard')?></a></li>
    					<?php foreach($tree_category_list as $item):?>
    					<li<?php if($board->tree_category->getCategoryNameWithDepth($board->tree_category->depth) == $item['category_name']):?> class="kboard-category-selected"<?php endif?>><a href="#" onclick="return kboard_tree_category_search('<?php echo $board->tree_category->depth?>', '<?php echo $item['category_name']?>')"><?php echo $item['category_name']?></a></li>
    					<?php endforeach?>
    				</ul>
    			</div>
    			
    			<?php foreach($board->tree_category->getSelectedList() as $key=>$category_name):?>
    				<?php $tree_category_list = $board->tree_category->getCategoryItemList($category_name)?>
    				<?php if($tree_category_list):?>
    				<div class="kboard-search-option-wrap-<?php echo $board->tree_category->depth?> kboard-search-option-wrap type-select">
    					<input type="hidden" name="kboard_search_option[tree_category_<?php echo $board->tree_category->depth?>][key]" value="tree_category_<?php echo $board->tree_category->depth?>">
    					<input type="hidden" name="kboard_search_option[tree_category_<?php echo $board->tree_category->depth?>][value]" value="<?php echo $board->tree_category->getCategoryNameWithDepth($board->tree_category->depth)?>">
    					<select onchange="return kboard_tree_category_search('<?php echo $board->tree_category->depth?>', this.value)">
    						<option<?php if(!$board->tree_category->getCategoryNameWithDepth($board->tree_category->depth)):?> selected<?php endif?> value=""><?php echo __('All', 'kboard')?></option>
    						<?php foreach($tree_category_list as $item):?>
    						<option<?php if($board->tree_category->getCategoryNameWithDepth($board->tree_category->depth) == $item['category_name']):?> selected<?php endif?> value="<?php echo $item['category_name']?>"><?php echo $item['category_name']?></option>
    						<?php endforeach?>
    					</select>
    				</div>
    				<?php endif?>
    			<?php endforeach?>
    		</div>
    	</form>
    </div>

    탭 형식을 기본으로 사용 중이시라면 list-category-tree-tab.php 파일을 수정해주시면 됩니다.

    고맙습니다.

워드프레스 에러 기술지원 서비스 전문가에게 맡기세요