<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
	<channel>
				<title><![CDATA[글쓰기에서 일반 카테고리 선택 후 제출 완료 시 재정렬 문제]]></title>
		<link>https://www.cosmosfarm.com/threads/rss/document/41879</link>
		<description><![CDATA[<p>현재 일반 카테고리를 쓰고 있습니다.</p>

<p>1/2번 카테고리 모두 아무것도 선택하지 않은 상태(ALL/ALL)에서 글쓰기로 넘어간 후에 카테고리를 선택하고 제출 완료 할 경우, 게시판은 유저가 선택한 카테고리를 기준으로 재정렬 되는 것이 아니라 최초 ALL/ALL 상태로 유지됩니다.</p>

<p>따라서 글쓰기 상태에서 유저가 선택한 카테고리로 재정렬 되도록 하고 싶은데, 어떻게 하면 좋을까요?</p>

<p>오늘 하루도 건강 유념하시길 바랍니다.</p>]]></description>
		<copyright>Copyright 2026, 코스모스팜</copyright>
				<item>
			<title><![CDATA[안녕하세요.

카테고리2도 적용되게 하시려면

아래의 코드를 활용해보시겠어요?


add_filter('kboard_...]]></title>
			<link>https://www.cosmosfarm.com/threads/document/41913</link>
			<description><![CDATA[<p>안녕하세요.</p>

<p>카테고리2도 적용되게 하시려면</p>

<p>아래의 코드를 활용해보시겠어요?</p>

<pre>
<code class="language-php">add_filter('kboard_after_executing_url', 'kboard_after_executing_url_2020_03_13', 999, 3);
function kboard_after_executing_url_2020_03_13($next_page_url, $execute_uid, $board_id){
	if($board_id == '1'){ // 실제 게시판 id로 적용해주세요.
		$url = new KBUrl();
		$content = new KBContent();
		$content-&gt;initWithUID($execute_uid);
		
		$next_page_url = $url-&gt;set('category1', $content-&gt;category1)-&gt;set('category2', $content-&gt;category2)-&gt;set('uid', $execute_uid)-&gt;set('mod', 'list')-&gt;toString();
	}
	
	return $next_page_url;
}</code></pre>

<p>고맙습니다.</p>]]></description>
			<author>스레드봇</author>
			<pubDate>Sun, 15 Mar 2020 23:44:19 +0000</pubDate>
			<category>KBoard</category>
		</item>
				<item>
			<title><![CDATA[감사합니다~ ^^ 카테고리1의 경우 깔끔하게 잘 적용이 됩니다 ㅎㅎ

근데 죄송하게도 카테고리2의 경우...]]></title>
			<link>https://www.cosmosfarm.com/threads/document/41909</link>
			<description><![CDATA[<p>감사합니다~ ^^ 카테고리1의 경우 깔끔하게 잘 적용이 됩니다 ㅎㅎ</p>

<p>근데 죄송하게도 카테고리2의 경우는 제가 추가한 것으로는 적용이 잘 안되서, 이 부분도 조언이 가능할까요?</p>

<p>숟가락 떠먹는듯하여 죄송합니다만ㅜㅜ 실력이 모잘라서 재차 질문드리게 되네요. 아무쪼록 도움 주셔서 감사합니다.</p>]]></description>
			<author>Jaemin S.</author>
			<pubDate>Sun, 15 Mar 2020 02:58:21 +0000</pubDate>
			<category>KBoard</category>
		</item>
				<item>
			<title><![CDATA[안녕하세요~^^

KBoard 플러그인에 내장되어 있는 kboard_after_executing_url 필터를 활용하시면

게시...]]></title>
			<link>https://www.cosmosfarm.com/threads/document/41888</link>
			<description><![CDATA[<p>안녕하세요~^^</p>

<p>KBoard 플러그인에 내장되어 있는 kboard_after_executing_url 필터를 활용하시면</p>

<p>게시글 작성 후 이동할 페이지 주소를 편집하실 수 있습니다.</p>

<p>게시글 작성 시 입력한 카테고리1을 게시글 작성 후 게시글 목록 페이지에서 적용하시려면</p>

<p>아래의 코드를 활용해보시겠어요?</p>

<pre>
<code class="language-php">add_filter('kboard_after_executing_url', 'kboard_after_executing_url_2020_03_13', 999, 3);
function kboard_after_executing_url_2020_03_13($next_page_url, $execute_uid, $board_id){
	if($board_id == '1'){ // 실제 게시판 id로 적용해주세요.
		$url = new KBUrl();
		$content = new KBContent();
		$content-&gt;initWithUID($execute_uid);
		
		$next_page_url = $url-&gt;set('category1', $content-&gt;category1)-&gt;set('uid', $execute_uid)-&gt;set('mod', 'list')-&gt;toString();
	}
	
	return $next_page_url;
}</code></pre>

<p>위의 코드에서 $board_id == '1' 부분은 실제 게시판 id로 적용해주세요.</p>

<p> </p>

<p>테마의 functions.php 파일에 코드를 추가하거나 <a href="https://ko.wordpress.org/plugins/code-snippets/" target="_blank">Code Snippets</a> 플러그인을 사용해서 코드를 추가할 수 있습니다.</p>

<p>고맙습니다.</p>]]></description>
			<author>스레드봇</author>
			<pubDate>Fri, 13 Mar 2020 04:51:18 +0000</pubDate>
			<category>KBoard</category>
		</item>
			</channel>
</rss>