1. 정확한 제품 또는 플러그인 이름
Kboard-> 오션 갤러리(최신글 두 게시판 사용)-> 최신글 모아보기(pic 갤러리)
2. 상세 내용
오션 갤러리 두 게시판을 작성하여 메인에 두개의 최신글 형태로 모아 두었습니다. 이를 전체 페이지에서 볼수 있도록 페이지를 만들고 있습니다. 현재 최신글 모아보기에서 테마를 적용시켜 이미지를 가져 왔고(테마 : pic 갤러리)
pic갤러리에서 -? lastest.php 에서 코드 수정하고 있습니다. 이때 검색창이랑 숫자는 만들어졌는데 페이지가 넘어가지 않습니다. 이때 리스트를 나열하고 페이징을 만들고 싶습니다.
3. 확인 가능한 상세 페이지 주소
4. 수정한 코드 내역 (있다면)
latest.php
<div id="kboard-pic-gallery-latest">
<?php while($content = $list->hasNext()):?>
<div class="kboard-pic-gallery-latest-item">
<a href="<?php echo $url->getDocumentURLWithUID($content->uid)?>#kboard-pic-gallery-document" class="kboard-pic-gallery-latest-thumbnail">
<?php if($content->getThumbnail(180, 180)):?>
<img src="<?php echo $content->getThumbnail(180, 180)?>" alt="">
<?php else:?>
<i class="icon-picture"></i>
<?php endif?>
</a>
<div class="kboard-pic-gallery-latest-title">
<p class="kboard-pic-gallery-cut-strings"><a href="<?php echo $url->getDocumentURLWithUID($content->uid)?>#kboard-pic-gallery-document"><?php echo $content->title?></a></p>
</div>
</div>
<?php endwhile?>
</div>
<!-- 리스트 시작 -->
<ul id="kboard-pic-gallery-latest">
<?php while($content = $list->hasNextNotice()):?>
<li class="kboard-list-item kboard-list-notice<?php if($content->uid == kboard_uid()):?> kboard-list-selected<?php endif?>">
<div class="kboard-item-wrap">
<p class="kboard-item-title kboard-pic-gallery-cut-strings"><a href="<?php echo $url->getDocumentURLWithUID($content->uid)?>#kboard-pic-gallery-document"><?php echo $content->title?></a></p>
<a href="<?php echo $url->getDocumentURLWithUID($content->uid)?>#kboard-pic-gallery-document" class="kboard-item-thumbnail">
<?php if($content->getThumbnail(270, 177)):?>
<img src="<?php echo $content->getThumbnail(270, 177)?>" alt="">
<?php else:?>
<i class="icon-picture"></i>
<?php endif?>
</a>
<div class="kboard-item-description">
<a href="<?php echo $url->getDocumentURLWithUID($content->uid)?>#kboard-pic-gallery-document" class="kboard-item-avatar">
<?php if($content->member_uid):?>
<span title="<?php echo $content->getUserDisplay()?>"><?php echo get_avatar($content->member_uid, 45, '', $content->member_display)?></span>
<?php else:?>
<span title="<?php echo $content->getUserDisplay()?>"><img src="<?php echo $skin_path?>/images/default-avatar.png" alt="<?php echo $content->getUserDisplay()?>"></span>
<?php endif?>
<img src="<?php echo $skin_path?>/images/avatar-mask.png" alt="" class="kboard-item-avatar-mask">
</a>
<p class="kboard-item-user">by <span><?php echo $content->getUserDisplay()?></span></p>
</div>
<div class="kboard-item-info">
<span class="kboard-item-info-views"><?php echo $content->view?></span>
<span class="kboard-item-info-comments"><?php echo $content->getCommentsCount()?></span>
<a href="<?php echo $url->getDocumentURLWithUID($content->uid)?>#kboard-pic-gallery-document" class="kboard-item-info-chain"></a>
</div>
</div>
</li>
<?php endwhile?>
</ul>
<ul id="kboard-pic-gallery-lates">
<?php while($content = $list->hasNext()):?>
<li class="kboard-list-item<?php if($content->uid == kboard_uid()):?> kboard-list-selected<?php endif?>">
<div class="kboard-item-wrap">
<p class="kboard-item-title kboard-pic-gallery-cut-strings"><a href="<?php echo $url->getDocumentURLWithUID($content->uid)?>#kboard-pic-gallery-document"><?php echo $content->title?></a></p>
<a href="<?php echo $url->getDocumentURLWithUID($content->uid)?>#kboard-pic-gallery-document" class="kboard-item-thumbnail">
<?php if($content->getThumbnail(270, 177)):?>
<img src="<?php echo $content->getThumbnail(270, 177)?>" alt="">
<?php else:?>
<i class="icon-picture"></i>
<?php endif?>
</a>
<div class="kboard-item-description">
<a href="<?php echo $url->getDocumentURLWithUID($content->uid)?>#kboard-pic-gallery-document" class="kboard-item-avatar">
<?php if($content->member_uid):?>
<span title="<?php echo $content->getUserDisplay()?>"><?php echo get_avatar($content->member_uid, 45, '', $content->member_display)?></span>
<?php else:?>
<span title="<?php echo $content->getUserDisplay()?>"><img src="<?php echo $skin_path?>/images/default-avatar.png" alt="<?php echo $content->getUserDisplay()?>"></span>
<?php endif?>
<img src="<?php echo $skin_path?>/images/avatar-mask.png" alt="" class="kboard-item-avatar-mask">
</a>
<p class="kboard-item-user">by <span><?php echo $content->getUserDisplay()?></span></p>
</div>
<div class="kboard-item-info">
<span class="kboard-item-info-views"><?php echo $content->view?></span>
<span class="kboard-item-info-comments"><?php echo $content->getCommentsCount()?></span>
<a href="<?php echo $url->getDocumentURLWithUID($content->uid)?>#kboard-pic-gallery-document" class="kboard-item-info-chain"></a>
</div>
</div>
</li>
<?php endwhile?>
</ul>
<!-- 페이징 시작 -->
<div id="kboard-pic-gallery-lates">
<ul class="kboard-pagination-pages">
<?php echo kboard_pagination($list->page, $list->total, $list->rpp)?>
</ul>
</div>
<!-- 페이징 끝 -->
<form id="kboard-search-form" method="get" action="<?php echo $url->toString()?>">
<?php echo $url->set('pageid', '1')->set('target', '')->set('keyword', '')->set('mod', 'list')->toInput()?>
<div class="kboard-search">
<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 kboard_keyword()?>" placeholder="<?php echo __('Search', 'kboard')?>...">
<button type="submit" class="kboard-pic-gallery-button-small"><?php echo __('Search', 'kboard')?></button>
</div>
</form>
<?php if($board->isWriter()):?>
<!-- 버튼 시작 -->
<div class="kboard-control">
<a href="<?php echo $url->getContentEditor()?>" class="kboard-pic-gallery-button-small"><?php echo __('New', 'kboard')?></a>
</div>
<!-- 버튼 끝 -->
<?php endif?>
<?php if($board->contribution()):?>
<div class="kboard-pic-gallery-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>
안녕하세요~^^
코드를 올리실때는 코드 스니펫 기능을 사용해서 올려주시겠어요?
이전에도 비슷한 문의가 있었는데
아래 링크를 남겨드릴테니 참고해보시겠어요?
https://www.cosmosfarm.com/threads/document/28059
고맙습니다.