<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
	<channel>
				<title><![CDATA[게시판 post 글 복사 관련 문의]]></title>
		<link>https://www.cosmosfarm.com/threads/rss/document/34114</link>
		<description><![CDATA[<p>안녕하세요 수고많으십니다. </p>

<p>우선 post글이 "published"로 되면 kboard 게시판에 같이 등록되는 것은 </p>

<p><a href="https://www.cosmosfarm.com/threads/document/27526">https://www.cosmosfarm.com/threads/document/27526</a></p>

<p>해당 스레드 보고 이해는 했습니다. </p>

<p> </p>

<p>그런데 저희는 post에 wp user frontend 플러그인을 사용해서 </p>

<p>유저가 post를 쓰게끔하고있으며, </p>

<p>post쓰는 조건은 멤버쉽 패키지를 구입하여 글을 작성하게 됩니다. </p>

<p>그래서 멤버쉽 패키지가 만료되면 해당 게시글도 만료되게 세팅을 잡았습니다.</p>

<p>게시글 만료는 post expirator 플러그인을 사용중이며, </p>

<p>지정한 만료일이 될경우 post는 "draft"상태로 변경됩니다. </p>

<p> </p>

<p>위에 kboard로 복사등록된 게시글도 post 상태에 따라 published로 되어있는것만 표시하고, draft로 변경된것은 hide시키거나, 삭제할수 있습니까? 그게 안된다면, </p>

<p>얼럿메시지로 "게시글이 만료되었다는 알림문구"라도 띄우고 리다이렉트 시키고 싶습니다.</p>

<p> </p>

<p>팁 부탁드립니다.</p>

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

transition_post_status 액션을 활용하시면

워드프레스 글(Post)을 휴지통으로 보낼 때...]]></title>
			<link>https://www.cosmosfarm.com/threads/document/34117</link>
			<description><![CDATA[<p>안녕하세요~^^</p>

<p>transition_post_status 액션을 활용하시면</p>

<p>워드프레스 글(Post)을 휴지통으로 보낼 때 KBoard 게시글도 삭제되게 하실 수 있습니다.</p>

<p>테마 쪽 functions.php 파일 하단에</p>

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

<pre>
<code class="language-php">add_action('transition_post_status', 'my_transition_post_status1', 10, 3);
function my_transition_post_status1($new_status, $old_status, $post){
	if($post-&gt;post_type == 'post' &amp;&amp; $new_status == 'trash'){
		$content_uid = get_post_meta($post-&gt;ID, 'kboard_content_uid', true);
		
		$content = new KBContent();
		$content-&gt;initWithUID($content_uid);
		$content-&gt;remove();
	}
}</code></pre>

<p>워드프레스 관리자 -&gt; 외모 -&gt; 테마 편집기 페이지에서 functions.php 파일에 추가해서 테스트해보시겠어요?</p>

<p>고맙습니다.</p>]]></description>
			<author>스레드봇</author>
			<pubDate>Thu, 20 Jun 2019 00:56:45 +0000</pubDate>
			<category>KBoard</category>
		</item>
			</channel>
</rss>