게시글 위 카테고리 제목 표기

1. 정확한 제품 또는 플러그인 이름

Kboard

 

2. 상세 내용

안녕하세요, 플러그인 늘 잘 사용중에 있습니다.

페이지를 구축하였는데 게시글이 속해있는 카테고리 제목을 게시글 위에 출력하고 싶습니다.

다만, 모든 게시물이 아니라 카테고리에 속한 게시물 중 가장 최근 즉, 상단 게시물 위에만 카테고리 제목이 출력되게 하고 싶은데요,

아래 imgur에 유첨한 사진처럼 만들고 싶은데 지식이 짧아 어떤 코드를 수정해야할지 감이 안오네요 ㅠㅠ

일단 아래 코드를 넣으니까 카테고리 제목이 게시글 위에 뜨긴 하는데 제가 원하는 느낌이 아니고 모든 게시물 상단에 다 떠서요

<td class="kboard-list-category1"><?php echo $content->category1?></td>

 

도와주시면 감사하겠습니다.

 

3. 확인 가능한 상세 페이지 주소

https://imgur.com/a/UQB0iAG  (예시 사진)

 

4. 수정한 코드 내역 (있다면)

<div id="kboard-thumbnail-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()?>
			</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>
			<tbody>
				<?php while($content = $list->hasNextNotice()):?>
					<td class="kboard-list-category1"><?php echo $content->category1?></td>
					<tr class="<?php echo esc_attr($content->getClass())?>">
					<td class="kboard-list-uid"><?php echo __('Notice', 'kboard')?></td>
					</td>
					<td class="kboard-list-title">
							<div class="kboard-list-mobile-uid">
								<?php echo $list->index()?>
							</div>
							<div class="kboard-thumbnail-cut-strings">
								<?php if($content->getThumbnail(96, 70)):?>
								<div class="kboard-mobile-contents">
									<img src="<?php echo $content->getThumbnail(96, 70)?>" alt="<?php echo esc_attr($content->title)?>" class="contents-thumbnail">
								</div>
								<?php endif?>
								<?php if($content->isNew()):?><span class="kboard-thumbnail-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?>
							</div>
							<div class="content">
								<?php echo $content->content?>
							</div>
						</a>
					<td class="kboard-list-thumbnail">
						<?php if($content->getThumbnail(120, 90)):?><img src="<?php echo $content->getThumbnail(120, 90)?>" alt="<?php echo esc_attr($content->title)?>"><?php else:?><i class="icon-picture"></i><?php endif?>
						</a>
						<div class="kboard-mobile-contents">
						</div>
					</td>
				</tr>
				<?php endwhile?>
				<?php while($content = $list->hasNextPopular()):?>
					<td class="kboard-list-category1"><?php echo $content->category1?></td>
					<tr class="<?php echo esc_attr($content->getClass())?>">
					<td class="kboard-list-uid"><?php echo esc_html($board->getPopularName())?></td>
					<td class="kboard-list-title">
							<div class="kboard-list-mobile-uid">
								<?php echo $list->index()?>
							</div>
							<div class="kboard-thumbnail-cut-strings">
								<?php if($content->getThumbnail(96, 70)):?>
								<div class="kboard-mobile-contents">
									<img src="<?php echo $content->getThumbnail(96, 70)?>" alt="<?php echo esc_attr($content->title)?>" class="contents-thumbnail">
								</div>
								<?php endif?>
								<?php if($content->isNew()):?><span class="kboard-thumbnail-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?>
							</div>
							<div class="content">
								<?php echo $content->content?>
							</div>
						</a>
						<div class="kboard-mobile-contents">
						</div>
					</td>
						<td class="kboard-list-thumbnail">
						<?php if($content->getThumbnail(120, 90)):?><img src="<?php echo $content->getThumbnail(120, 90)?>" alt="<?php echo esc_attr($content->title)?>"><?php else:?><i class="icon-picture"></i><?php endif?>
						</a>
					</td>
				</tr>
				<?php $boardBuilder->builderReply($content->uid)?>
				<?php endwhile?>
				<?php while($content = $list->hasNext()):?>
					<td class="kboard-list-category1"><?php echo $content->category1?></td>
					<tr class="<?php echo esc_attr($content->getClass())?>">
					<td class="kboard-list-uid"><?php echo $list->index()?></td>
					<td class="kboard-list-title">
							<div class="kboard-list-mobile-uid">
								<?php echo $list->index()?>
							</div>
							<div class="kboard-thumbnail-cut-strings">
								<?php if($content->getThumbnail(96, 70)):?>
								<div class="kboard-mobile-contents">
									<img src="<?php echo $content->getThumbnail(96, 70)?>" alt="<?php echo esc_attr($content->title)?>" class="contents-thumbnail">
								</div>
								<?php endif?>
								<?php if($content->isNew()):?><span class="kboard-thumbnail-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?>
							</div>
							<div class="content">
								<?php echo $content->content?>
							</div>
						</a>
						<div class="kboard-mobile-contents">
						</div>
					</td>
						<td class="kboard-list-thumbnail">
						<?php if($content->getThumbnail(120, 90)):?><img src="<?php echo $content->getThumbnail(120, 90)?>" alt="<?php echo esc_attr($content->title)?>"><?php else:?><i class="icon-picture"></i><?php endif?>
						</a>
					</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 __('저자 or 저널명', 'kboard')?></option>
			</select>
			<input type="text" name="keyword" value="<?php echo esc_attr(kboard_keyword())?>">
			<button type="submit" class="kboard-thumbnail-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-thumbnail-button-small"><?php echo __('New', 'kboard')?></a>
	</div>
	<!-- 버튼 끝 -->
	<?php endif?>
	
	<?php if($board->contribution()):?>
	
	<?php endif?>
</div>

 

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