<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
	<channel>
				<title><![CDATA[게시판의 글 갯수를 제목 옆에 보이게 하기]]></title>
		<link>https://www.cosmosfarm.com/threads/rss/document/58698</link>
		<description><![CDATA[<p><strong>1. 정확한 제품 또는 플러그인 이름</strong></p>

<p>케이보드 오션프랜차이즈 스킨 사용중</p>

<p> </p>

<p><strong>2. 상세 내용</strong></p>

<p>안녕하세요?</p>

<p>이미지( https://imgur.com/a/PEYfUwb )처럼 글 갯수를 띄우고 싶은데요</p>

<p>https://www.cosmosfarm.com/threads/document/13544</p>

<p>이 게시글을 보고 전체 글 갯수를 띄우는데에는 성공했습니다.</p>

<p>그런데 서울,부산,대구 등등 <strong>각각의 지역별로 전부 갯수를 띄우려면</strong> 어떻게 해야하나요?</p>

<p>전체(16) 서울(2) 부산(3) 대구(7) 이런식으로 모든 지역의 이름 옆에 각각의 갯수를 띄우고 싶습니다. </p>

<p>지금은 전체만 나오네요. </p>

<p> </p>

<p><strong>3. 확인 가능한 상세 페이지 주소</strong></p>

<p>이미지: https://imgur.com/a/PEYfUwb</p>

<p>해당 게시판 링크:https://qrayedu.com/practice-hospital-find/</p>

<p> </p>

<p><strong>4. 수정한 코드 내역 (있다면)</strong></p>

<p>https://www.cosmosfarm.com/threads/document/13544</p>

<p>이 게시글을 참고해서 아래 코드를 <strong>skin/ocean-franchise/functions.php</strong>에 추가하였고</p>

<pre>
<code class="language-php">function get_kboard_category_count($board_id, $category){
	global $wpdb;
	
	$board_id = intval($board_id);
	$where[] = "`board_id`='$board_id'";
	
	if(isset($category['category1']) &amp;&amp; $category['category1']){
		$category1 = esc_sql($category['category1']);
		$where[] = "`category1`='{$category1}'";
	}
	
	if(isset($category['category2']) &amp;&amp; $category['category2']){
		$category2 = esc_sql($category['category2']);
		$where[] = "`category2`='{$category2}'";
	}
	
	return $wpdb-&gt;get_var("SELECT COUNT(*) FROM `{$wpdb-&gt;prefix}kboard_board_content` WHERE " . implode(' AND ', $where));
}</code></pre>

<p> </p>

<p><strong>skin/ocean-franchise/list.php</strong>에 다음 코드를 추가했습니다</p>

<pre>
<code class="language-php">&lt;a class="kboard-branch-button&lt;?php if(!kboard_category1()):?&gt; active&lt;?php endif?&gt;" href="&lt;?php echo $url-&gt;set('category1', '')-&gt;set('pageid', '1')-&gt;set('target', '')-&gt;set('keyword', '')-&gt;set('mod', 'list')-&gt;tostring()?&gt;" title="전체"&gt;
	&lt;?php echo __('All', 'kboard-ocean-franchise') ?&gt;  
	&lt;?php echo '('.get_kboard_category_count($board-&gt;id, array('category1'=&gt;$board-&gt;currentCategory())).')'; ?&gt;
&lt;/a&gt;</code></pre>

<p>이 코드 밑에 서울,부산,대구 등등 지역별 코드가 있습니다. 아래처럼 이렇게요</p>

<pre>
<code class="language-php">&lt;a class="kboard-branch-button&lt;?php if(kboard_category1()=='서울'):?&gt; active&lt;?php endif?&gt;" href="&lt;?php echo $url-&gt;set('category1', '서울')-&gt;set('pageid', '1')-&gt;set('target', '')-&gt;set('keyword', '')-&gt;set('mod', 'list')-&gt;tostring()?&gt;" title="서울"&gt;&lt;?php echo __('Seoul', 'kboard-ocean-franchise')?&gt;&lt;/a&gt;
&lt;a class="kboard-branch-button&lt;?php if(kboard_category1()=='부산'):?&gt; active&lt;?php endif?&gt;" href="&lt;?php echo $url-&gt;set('category1', '부산')-&gt;set('pageid', '1')-&gt;set('target', '')-&gt;set('keyword', '')-&gt;set('mod', 'list')-&gt;tostring()?&gt;" title="부산"&gt;&lt;?php echo __('Busan', 'kboard-ocean-franchise')?&gt;&lt;/a&gt;
&lt;a class="kboard-branch-button&lt;?php if(kboard_category1()=='대구'):?&gt; active&lt;?php endif?&gt;" href="&lt;?php echo $url-&gt;set('category1', '대구')-&gt;set('pageid', '1')-&gt;set('target', '')-&gt;set('keyword', '')-&gt;set('mod', 'list')-&gt;tostring()?&gt;" title="대구"&gt;&lt;?php echo __('Daegu', 'kboard-ocean-franchise')?&gt;&lt;/a&gt;</code></pre>

<p> </p>

<p>감사합니다 !! </p>]]></description>
		<copyright>Copyright 2026, 코스모스팜</copyright>
				<item>
			<title><![CDATA[안녕하세요~^^

오션 프렌차이즈 스킨의 list.php 파일 중 

아래의 코드를


&amp;lt;a class=&quot;kb...]]></title>
			<link>https://www.cosmosfarm.com/threads/document/58703</link>
			<description><![CDATA[<p>안녕하세요~^^</p>

<p>오션 프렌차이즈 스킨의 list.php 파일 중 </p>

<p>아래의 코드를</p>

<pre>
<code>&lt;a class="kboard-branch-button&lt;?php if(kboard_category1()=='서울'):?&gt; active&lt;?php endif?&gt;" href="&lt;?php echo $url-&gt;set('category1', '서울')-&gt;set('pageid', '1')-&gt;set('target', '')-&gt;set('keyword', '')-&gt;set('mod', 'list')-&gt;tostring()?&gt;" title="서울"&gt;&lt;?php echo __('Seoul', 'kboard-ocean-franchise')?&gt;&lt;/a&gt;
</code></pre>

<p>아래의 코드와 같이 </p>

<pre>
<code>&lt;a class="kboard-branch-button&lt;?php if(kboard_category1()=='서울'):?&gt; active&lt;?php endif?&gt;" href="&lt;?php echo $url-&gt;set('category1', '서울')-&gt;set('pageid', '1')-&gt;set('target', '')-&gt;set('keyword', '')-&gt;set('mod', 'list')-&gt;tostring()?&gt;" title="서울"&gt;&lt;?php echo __('Seoul', 'kboard-ocean-franchise')?&gt;
	(&lt;?php echo get_kboard_category_count($board-&gt;id, array('category1'=&gt;'서울'))?&gt;)
&lt;/a&gt;</code></pre>

<p>category1=&gt;부분에 카테고리명을 입력해보시겠어요?</p>

<p>고맙습니다.</p>]]></description>
			<author>스레드봇</author>
			<pubDate>Wed, 06 Apr 2022 01:53:16 +0000</pubDate>
			<category>KBoard</category>
		</item>
			</channel>
</rss>