일단 저는 코드는 볼줄 모릅니다..
게시판 리스트에 출력되는 항목을 변경하기 위해
WP 파일 관리자로 'kboard/skin/default/list.php' 파일을 수정했습니다.(코드 삭제하지 않고, 추가 및 주석처리함)
PC, Mobile 모두 원하는대로 되었는데, mobile에서 게시판 header가 안나옵니다.
그리고, 부모테마에서 해당 파일을 직접 수정하였는데, 케이보드 업데이트 등으로 작업한 내역이 사라질 수도 있을까요?
만약 그렇다면, 어떤식으로 작업을 해야할지 방향도 알려주시면 감사하겠습니다.
3. 확인 가능한 상세 페이지 주소
https://bit.ly/3zrbnvk
페이지 중간에 있습니다.
4. 수정한 코드 내역 (있다면)
<div id="kboard-default-list">
<!-- 게시판 정보 시작 -->
<div class="kboard-list-header">
<!-- <?php if(!$board->isPrivate()):?>
<div class="kboard-total-count">
<?php echo __('Total', 'kboard')?> <?php echo number_format($board->getListTotal())?>
</div> -->
<?php endif?>
<!-- <div class="kboard-sort">
<form id="kboard-sort-form-<?php echo $board->id?>" method="get" action="<?php echo esc_url($url->toString())?>">
<?php echo $url->set('pageid', '1')->set('category1', '')->set('category2', '')->set('target', '')->set('keyword', '')->set('mod', 'list')->set('kboard_list_sort_remember', $board->id)->toInput()?>
<select name="kboard_list_sort" onchange="jQuery('#kboard-sort-form-<?php echo $board->id?>').submit();">
<option value="newest"<?php if($list->getSorting() == 'newest'):?> selected<?php endif?>><?php echo __('Newest', 'kboard')?></option>
<option value="best"<?php if($list->getSorting() == 'best'):?> selected<?php endif?>><?php echo __('Best', 'kboard')?></option>
<option value="viewed"<?php if($list->getSorting() == 'viewed'):?> selected<?php endif?>><?php echo __('Viewed', 'kboard')?></option>
<option value="updated"<?php if($list->getSorting() == 'updated'):?> selected<?php endif?>><?php echo __('Updated', 'kboard')?></option>
</select>
</form>
</div> -->
</div>
<!-- 게시판 정보 끝 -->
<!-- 카테고리 시작 -->
<?php
if($board->use_category == 'yes'){
if($board->isTreeCategoryActive()){
$category_type = 'tree-select';
}
else{
$category_type = 'default';
}
$category_type = apply_filters('kboard_skin_category_type', $category_type, $board, $boardBuilder);
echo $skin->load($board->skin, "list-category-{$category_type}.php", $vars);
}
?>
<!-- 카테고리 끝 -->
<!-- 리스트 시작 -->
<div class="kboard-list">
<table>
<thead>
<tr>
<!--테이블 리스트의 헤더영역-->
<!-- <td class="kboard-list-uid"><?php echo __('Number', 'kboard')?></td> -->
<td class="kboard-list-title"><?php echo __('업체명', 'kboard')?></td>
<td class="kboard-list-type"><?php echo __('타입', $content->option->{'type'})?></td>
<td class="kboard-list-address"><?php echo __('주소', $content->option->{'address'})?></td>
<td class="kboard-list-tell"><?php echo __('전화번호', $content->option->{'tell'})?></td>
<!-- <td class="kboard-list-user"><?php echo __('Author', 'kboard')?></td> -->
<!-- <td class="kboard-list-date"><?php echo __('Date', 'kboard')?></td> -->
<!-- <td class="kboard-list-vote"><?php echo __('Votes', 'kboard')?></td> -->
<!-- <td class="kboard-list-view"><?php echo __('Views', 'kboard')?></td> -->
</tr>
</thead>
<tbody>
<?php while($content = $list->hasNextNotice()):?>
<tr class="<?php echo esc_attr($content->getClass())?> partnership-list">
<!-- <td class="kboard-list-uid"><?php echo __('Notice', 'kboard')?></td> -->
<td class="kboard-list-title">
<!-- <a href="<?php echo esc_url($url->getDocumentURLWithUID($content->uid))?>"> -->
<div class="kboard-default-cut-strings">
<?php if($content->isNew()):?><span class="kboard-default-new-notify">New</span><?php endif?>
<?php if($content->secret):?><img src="<?php echo $skin_path?>/images/icon-lock.png" alt="<?php echo __('Secret', 'kboard')?>"><?php endif?>
<?php echo $content->title?>
<!-- <span class="kboard-comments-count"><?php echo $content->getCommentsCount()?></span> -->
</div>
<!-- </a> -->
<div class="kboard-mobile-contents">
<span class="contents-item kboard-type"><?php echo $content->option->{'type'}?></span>
<span class="contents-item kboard-address"><?php echo $content->option->{'address'}?></span>
<span class="contents-item kboard-tell"><?php echo $content->option->{'tell'}?></span>
<!-- <span class="contents-item kboard-user"><?php echo $content->getUserDisplay()?></span> -->
<!-- <span class="contents-separator kboard-date">|</span> -->
<!-- <span class="contents-item kboard-date"><?php echo $content->getDate()?></span> -->
<!-- <span class="contents-separator kboard-vote">|</span> -->
<!-- <span class="contents-item kboard-vote"><?php echo __('Votes', 'kboard')?> <?php echo $content->vote?></span> -->
<!-- <span class="contents-separator kboard-view">|</span> -->
<!-- <span class="contents-item kboard-view"><?php echo __('Views', 'kboard')?> <?php echo $content->view?></span> -->
</div>
</td>
<td class="kboard-list-type"><?php echo $content->option->{'type'}?></td>
<td class="kboard-list-address"><?php echo $content->option->{'address'}?></td>
<td class="kboard-list-tell"><?php echo $content->option->{'tell'}?></td>
<!-- <td class="kboard-list-user"><?php echo $content->getUserDisplay()?></td> -->
<!-- <td class="kboard-list-date"><?php echo $content->getDate()?></td> -->
<!-- <td class="kboard-list-vote"><?php echo $content->vote?></td> -->
<!-- <td class="kboard-list-view"><?php echo $content->view?></td> -->
</tr>
<?php endwhile?>
<?php while($content = $list->hasNextPopular()):?>
<!--어디 영역-->
<tr class="<?php echo esc_attr($content->getClass())?> partnership-list">
<!-- <td class="kboard-list-uid"><?php echo esc_html($board->getPopularName())?></td> -->
<td class="kboard-list-title">
<!-- <a href="<?php echo esc_url($url->getDocumentURLWithUID($content->uid))?>"> -->
<div class="kboard-default-cut-strings">
<?php if($content->isNew()):?><span class="kboard-default-new-notify">New</span><?php endif?>
<?php if($content->secret):?><img src="<?php echo $skin_path?>/images/icon-lock.png" alt="<?php echo __('Secret', 'kboard')?>"><?php endif?>
<?php echo $content->title?>
<!-- <span class="kboard-comments-count"><?php echo $content->getCommentsCount()?></span> -->
</div>
<!-- </a> -->
<div class="kboard-mobile-contents">
<span class="contents-item kboard-type"><?php echo $content->option->{'type'}?></span>
<span class="contents-item kboard-address"><?php echo $content->option->{'address'}?></span>
<span class="contents-item kboard-tell"><?php echo $content->option->{'tell'}?></span>
<!-- <span class="contents-item kboard-user"><?php echo $content->getUserDisplay()?></span> -->
<!-- <span class="contents-separator kboard-date">|</span> -->
<!-- <span class="contents-item kboard-date"><?php echo $content->getDate()?></span> -->
<!-- <span class="contents-separator kboard-vote">|</span> -->
<!-- <span class="contents-item kboard-vote"><?php echo __('Votes', 'kboard')?> <?php echo $content->vote?></span> -->
<!-- <span class="contents-separator kboard-view">|</span> -->
<!-- <span class="contents-item kboard-view"><?php echo __('Views', 'kboard')?> <?php echo $content->view?></span> -->
</div>
</td>
<td class="kboard-list-type"><?php echo $content->option->{'type'}?></td>
<td class="kboard-list-address"><?php echo $content->option->{'address'}?></td>
<td class="kboard-list-tell"><?php echo $content->option->{'tell'}?></td>
<!-- <td class="kboard-list-user"><?php echo $content->getUserDisplay()?></td> -->
<!-- <td class="kboard-list-date"><?php echo $content->getDate()?></td> -->
<!-- <td class="kboard-list-vote"><?php echo $content->vote?></td> -->
<!-- <td class="kboard-list-view"><?php echo $content->view?></td> -->
</tr>
<?php endwhile?>
<?php while($content = $list->hasNext()):?>
<!--테이블 리스트 영역-->
<tr class="<?php echo esc_attr($content->getClass())?> partnership-list">
<!-- <td class="kboard-list-uid"><?php echo $list->index()?></td> -->
<td class="kboard-list-title">
<a href="<?php echo esc_url($url->getDocumentURLWithUID($content->uid))?>">
<div class="kboard-default-cut-strings">
<?php if($content->isNew()):?><span class="kboard-default-new-notify">New</span><?php endif?>
<?php if($content->secret):?><img src="<?php echo $skin_path?>/images/icon-lock.png" alt="<?php echo __('Secret', 'kboard')?>"><?php endif?>
<?php echo $content->title?>
<!-- <span class="kboard-comments-count"><?php echo $content->getCommentsCount()?></span> -->
</div>
</a>
<div class="kboard-mobile-contents">
<!--리스트에 들어갈 데이터 불러오기-->
<span class="contents-item kboard-type"><?php echo $content->option->{'type'}?></span>
<span class="contents-item kboard-address"><?php echo $content->option->{'address'}?></span>
<span class="contents-item kboard-tell"><?php echo $content->option->{'tell'}?></span>
<!-- <span class="contents-item kboard-user"><?php echo $content->getUserDisplay()?></span> -->
<!-- <span class="contents-separator kboard-date">|</span> -->
<!-- <span class="contents-item kboard-date"><?php echo $content->getDate()?></span> -->
<!-- <span class="contents-separator kboard-vote">|</span> -->
<!-- <span class="contents-item kboard-vote"><?php echo __('Votes', 'kboard')?> <?php echo $content->vote?></span> -->
<!-- <span class="contents-separator kboard-view">|</span> -->
<!-- <span class="contents-item kboard-view"><?php echo __('Views', 'kboard')?> <?php echo $content->view?></span> -->
</div>
</td>
<!--리스트에 출력하기-->
<td class="kboard-list-type"><?php echo $content->option->{'type'}?></td>
<td class="kboard-list-address"><?php echo $content->option->{'address'}?></td>
<td class="kboard-list-tell"><?php echo $content->option->{'tell'}?></td>
<!-- <td class="kboard-list-user"><?php echo $content->getUserDisplay()?></td> -->
<!-- <td class="kboard-list-date"><?php echo $content->getDate()?></td> -->
<!-- <td class="kboard-list-vote"><?php echo $content->vote?></td> -->
<!-- <td class="kboard-list-view"><?php echo $content->view?></td> -->
</tr>
<?php $boardBuilder->builderReply($content->uid)?>
<?php endwhile?>
</tbody>
</table>
</div>
<!-- 리스트 끝 -->
<!-- 페이징 시작 -->
<div class="kboard-pagination">
<ul class="kboard-pagination-pages">
<?php echo kboard_pagination($list->page, $list->total, $list->rpp)?>
</ul>
</div>
<!-- 페이징 끝 -->
<!-- 검색폼 시작 -->
<!--<div class="kboard-search">
<form id="kboard-search-form-<?php echo $board->id?>" method="get" action="<?php echo esc_url($url->toString())?>">
<?php echo $url->set('pageid', '1')->set('target', '')->set('keyword', '')->set('mod', 'list')->toInput()?>
<select name="target">
<option value=""><?php echo __('All', 'kboard')?></option>
<option value="title"<?php if(kboard_target() == 'title'):?> selected<?php endif?>><?php echo __('Title', 'kboard')?></option>
<option value="content"<?php if(kboard_target() == 'content'):?> selected<?php endif?>><?php echo __('Content', 'kboard')?></option>
<option value="member_display"<?php if(kboard_target() == 'member_display'):?> selected<?php endif?>><?php echo __('Author', 'kboard')?></option>
</select>
<input type="text" name="keyword" value="<?php echo esc_attr(kboard_keyword())?>">
<button type="submit" class="kboard-default-button-small"><?php echo __('Search', 'kboard')?></button>
</form>
</div> -->
<!-- 검색폼 끝 -->
<?php if($board->isWriter()):?>
<!-- 버튼 시작 -->
<div class="kboard-control">
<a href="<?php echo esc_url($url->getContentEditor())?>" class="kboard-default-button-small"><?php echo __('New', 'kboard')?></a>
</div>
<!-- 버튼 끝 -->
<?php endif?>
<?php if($board->contribution()):?>
<!-- <div class="kboard-default-poweredby">
<a href="https://www.cosmosfarm.com/products/kboard" onclick="window.open(this.href);return false;" title="<?php echo __('KBoard is the best community software available for WordPress', 'kboard')?>">Powered by KBoard</a>
</div> -->
<?php endif?>
</div>
AI에 의해 자동 생성된 답변이에요 😀
안녕하세요! WordPress 전문가입니다. kboard 게시판의 default 스킨을 수정하면서 모바일에서 게시판 header가 안 보인다는 문제가 발생했군요. 코드를 수정하신 것 같은데, 모바일에서 header가 안 보인다면 CSS 스타일이나 미디어 쿼리 설정 등이 문제일 수 있습니다. 먼저 해당 부분을 확인해보시고, 필요하다면 추가적인 CSS 코드를 작성하여 해결해보세요.
그리고, 직접 부모 테마의 파일을 수정하셨다면, 케이보드 플러그인을 업데이트하거나 테마를 변경할 때 해당 수정 내역이 사라질 수 있습니다. 이런 경우를 방지하기 위해서는 Child Theme을 생성하여 해당 파일을 수정하는 것이 좋습니다. Child Theme을 사용하면 부모 테마의 파일을 직접 수정하지 않고도 원하는 기능을 추가하거나 수정할 수 있습니다.
문제가 해결되지 않는다면 다시 문의 주시면 더 자세히 도와드리겠습니다. 감사합니다!
↓ 아래 버튼을 눌러서 피드백해주세요.
안녕하세요~^^
말씀해 주신 대로 kboard/skin/default/list.php 파일에서 직접 수정을 하셨다면
케이보드 업데이트가 된다면 작업하신 코드가 사라질 수도 있습니다.
그렇기 때문에 번거롭더라도 작업하신 코드를 복사해 백업해 두시는고
업데이트 후 백업 해두신 코드를 다시 추가해 사용하셔야 할 것 같습니다.
모바일에서 header가 안 보인다면 CSS 스타일이나 미디어 쿼리 설정 등이 문제일 수 있습니다.
헤더 부분 css코드에 모바일 설정이 되어있 는 지 확인해보셔야 할 것 같습니다.
고맙습니다.