친절하신 답변에 항상 감사드립니다.
다름아니라 첨부처럼 https://imgur.com/a/TpcL41x 카테고리에서 '전체'를 맨 뒤로 옮기려고
list-category-default.php 훑어보고 있는데
위치를 옮길수 있다면 제가 보는 php가 맞는지와 지금 계속 적용 실패하고 있어서 어느 부분을 봐야될지
도움 부탁드립니다^^
안녕하세요~^^
list-category-default.php 파일을 수정하시려면
아래의 코드를 찾아서
<?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?>
아래의 코드로 교체해보시겠어요?
<?php if($board->initCategory1()):?>
<ul class="kboard-category-list">
<?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?>
<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>
</ul>
<?php endif?>
<?php if($board->initCategory2()):?>
<ul class="kboard-category-list">
<?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?>
<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>
</ul>
<?php endif?>
고맙습니다.
굳이 원본파일을 안건들고
CSS로도 충분할거같은데요
.kboard-category .kboard-category-list li:first-child{float:right;}
위 코드를 테마내 style.css에 추가하시면 "전체" 카테고리가 가장 우측으로 갈겁니다.
다만 카테고리 맨우측이 아닌 화면기준 맨 우측으로가니 거기서 약간의 수정이 더 필요하겠네요