<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
	<channel>
				<title><![CDATA[비너스웹진 게시판 게시글에 사진없을 경우 기본 썸네일 지정하는 방법 알고 싶습니다.]]></title>
		<link>https://www.cosmosfarm.com/threads/rss/document/36259</link>
		<description><![CDATA[<p>안녕하세요. 스레드 봇님!</p>

<p>비너스웹진 게시판을 쓰고 있습니다.</p>

<p>사용하다 보니 게시글에 사진없을 경우 썸네일이 아무것도 안나타나는 경우가 있던데</p>

<p>이렇게 게시글에 사진이 없더라도 기본 특정 이미지를 자동으로 썸네일로 넣는 방법이 있는지 알고 싶습니다. ^^</p>]]></description>
		<copyright>Copyright 2026, 코스모스팜</copyright>
				<item>
			<title><![CDATA[스레드봇님 고맙습니다. 위에 알려주신 괄호 닫힘 오류가 하나 있었고,

그래도 오류가 나길레 다시 체...]]></title>
			<link>https://www.cosmosfarm.com/threads/document/36351</link>
			<description><![CDATA[<p>스레드봇님 고맙습니다. 위에 알려주신 괄호 닫힘 오류가 하나 있었고,</p>

<p>그래도 오류가 나길레 다시 체크해보니</p>

<p>add_filter('kboard_content_get_thumbnail', 'my_kboard_content_get_thumbnail', 10, 3) </p>

<p>-&gt;add_filter('kboard_content_get_thumbnail', 'my_kboard_content_get_thumbnail', 10, 4)로 수정하니 잘 됩니다. </p>

<p>정말 정말 정말 고맙습니다. 맛있는 점심식사 하셔요~! ^^</p>]]></description>
			<author>James Sung</author>
			<pubDate>Thu, 29 Aug 2019 02:19:40 +0000</pubDate>
			<category>KBoard</category>
		</item>
				<item>
			<title><![CDATA[안녕하세요.

코드를 잘못 수정하신 듯합니다.

올려주신 코드 중 '62')) 부분을 '62')))로 교체해서 확...]]></title>
			<link>https://www.cosmosfarm.com/threads/document/36335</link>
			<description><![CDATA[<p>안녕하세요.</p>

<p>코드를 잘못 수정하신 듯합니다.</p>

<p>올려주신 코드 중 '62')) 부분을 '62')))로 교체해서 확인해보시겠어요?</p>

<p>코드 수정 시 소괄호, 중괄호 열고 닫힘을 잘 확인해보세요.</p>

<p> </p>

<p>또, 워드프레스 필터는 여러 개 사용하실 수 있지만</p>

<p>PHP 함수명은 중복해서 사용하시면 안 됩니다.</p>

<p>today_best_kboard_list_where 부분을 today_best_kboard_list_where1, today_best_kboard_list_where2, today_best_kboard_list_where3 이런 식으로</p>

<p>중복되지 않게 코드를 모두 수정해보시겠어요?</p>

<p>고맙습니다.</p>]]></description>
			<author>스레드봇</author>
			<pubDate>Wed, 28 Aug 2019 23:48:22 +0000</pubDate>
			<category>KBoard</category>
		</item>
				<item>
			<title><![CDATA[
&amp;lt;?php 
function theme_enqueue_styles() {
    wp_enqueue_style( 'parent-style', get_templa...]]></title>
			<link>https://www.cosmosfarm.com/threads/document/36327</link>
			<description><![CDATA[<pre>
<code>&lt;?php 
function theme_enqueue_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( 'parent-style' ) );
}
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );


add_filter('kboard_list_where', 'today_best_kboard_list_where', 10, 3);
function today_best_kboard_list_where($where, $board_id, $content_list){
	$keyword = kboard_keyword();
	$target = kboard_target();
	
	if($board_id == '21'){ // 실제 적용될 베스트 게시판의 ID값으로 변경해주세요.
		$vote = '3';
		if($keyword){
			$keyword = "%{$keyword}%";
			if($target){
				$where = "`vote`&gt;='{$vote}' AND `{$target}` LIKE '{$keyword}' AND `parent_uid`='0' AND `notice`='' AND (`status`='' OR `status` IS NULL OR `status`='pending_approval')";
			}
			else{
				$where = "`vote`&gt;='{$vote}' AND (`title` LIKE '{$keyword}' OR `content` LIKE '{$keyword}' OR `member_display` LIKE '{$keyword}') AND `parent_uid`='0' AND `notice`='' AND (`status`='' OR `status` IS NULL OR `status`='pending_approval')";
			}
		}
		else{
			$where = "`vote`&gt;='{$vote}' AND `parent_uid`='0' AND `notice`='' AND (`status`='' OR `status` IS NULL OR `status`='pending_approval')";
		}
	}
	
	if($board_id == '22'){ // 실제 적용될 베스트 오브 베스트 게시판의 ID값으로 변경해주세요.
		$vote = '5';
		if($keyword){
			$keyword = "%{$keyword}%";
			if($target){
				$where = "`vote`&gt;='{$vote}' AND `{$target}` LIKE '{$keyword}' AND `parent_uid`='0' AND `notice`='' AND (`status`='' OR `status` IS NULL OR `status`='pending_approval')";
			}
			else{
				$where = "`vote`&gt;='{$vote}' AND (`title` LIKE '{$keyword}' OR `content` LIKE '{$keyword}' OR `member_display` LIKE '{$keyword}') AND `parent_uid`='0' AND `notice`='' AND (`status`='' OR `status` IS NULL OR `status`='pending_approval')";
			}
		}
		else{
			$where = "`vote`&gt;='{$vote}' AND `parent_uid`='0' AND `notice`='' AND (`status`='' OR `status` IS NULL OR `status`='pending_approval')";
		}
	}
	
	if($board_id == '61'){ // 실제 게시판 id로 적용해주세요.
		if($keyword){
			$keyword = "%{$keyword}%";
			if($target){
				$where .= "OR `board_id` IN ('20','9','24','25','26','13','14','15','17','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','45','46','47','50','51','52','53','54','55','56','57','58','59','62') AND `{$target}` LIKE '{$keyword}' AND `parent_uid`='0' AND `notice`='' AND (`status`='' OR `status` IS NULL OR `status`='pending_approval')";
			}
			else{
				$where .= "OR `board_id` IN ('20','9','24','25','26','13','14','15','17','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','45','46','47','50','51','52','53','54','55','56','57','58','59','62') AND (`title` LIKE '{$keyword}' OR `content` LIKE '{$keyword}' OR `member_display` LIKE '{$keyword}') AND `parent_uid`='0' AND `notice`='' AND (`status`='' OR `status` IS NULL OR `status`='pending_approval')";
			}
		}
		else{
			$where .= " OR `board_id` IN ('20','9','24','25','26','13','14','15','17','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','45','46','47','50','51','52','53','54','55','56','57','58','59','62')";
		}
	}
	
	return $where;
}

add_filter('kboard_allowed_board_id', 'my_kboard_allowed_board_id1', 10, 2);
function my_kboard_allowed_board_id1($allowed_board_id, $board_id){
	if($allowed_board_id == '21'){ // 베스트 게시판
		$allowed_board_id = array('21','22','61','20','9','24','25','26','13','14','15','17','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','45','46','47','50','51','52','53','54','55','56','57','58','59','62'); // 자신과 다른 게시판의 ID값을 입력
	}
	else if($allowed_board_id == '22'){ // 베스트 오브 베스트 게시판
		$allowed_board_id = array('22','21','61','20','9','24','25','26','13','14','15','17','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','45','46','47','50','51','52','53','54','55','56','57','58','59','62'); // 자신과 다른 게시판의 ID값을 입력
	}
             else if($allowed_board_id == '61'){ // 베스트 오브 베스트 게시판
		$allowed_board_id = array('22','21','61','20','9','24','25','26','13','14','15','17','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','45','46','47','50','51','52','53','54','55','56','57','58','59','62'); // 자신과 다른 게시판의 ID값을 입력
	}
	return $allowed_board_id;
}




add_filter('kboard_list_where', 'today_best_kboard_list_where', 10, 3);
function today_best_kboard_kboard_list_where($where, $board_id, $content_list){
    $keyword = kboard_keyword();
    $target = kboard_target();
    
    if(in_array($board_id, array('21','22','61'))){ // 실제 적용될 게시판의 ID값으로 변경해주세요.
        $date = date('Ym01000000', current_time('timestamp')); // 이번달 시작 날짜 기준
        if($keyword){
            $keyword = "%{$keyword}%";
            if($target){
                $where = "`date`&gt;='{$date}' AND `{$target}` LIKE '{$keyword}' AND `parent_uid`='0' AND `notice`='' AND (`status`='' OR `status` IS NULL OR `status`='pending_approval')";
            }
            else{
                $where = "`date`&gt;='{$date}' AND (`title` LIKE '{$keyword}' OR `content` LIKE '{$keyword}' OR `member_display` LIKE '{$keyword}') AND `parent_uid`='0' AND `notice`='' AND (`status`='' OR `status` IS NULL OR `status`='pending_approval')";
            }
        }
        else{
            $where = "`date`&gt;='{$date}' AND `parent_uid`='0' AND `notice`='' AND (`status`='' OR `status` IS NULL OR `status`='pending_approval')";
        }
    }
    
    return $where;
}



add_filter('kboard_list_where', 'today_best_kboard_list_where', 10, 3);
function today_best_kboard_kboard_list_where($where, $board_id, $content_list){
    $keyword = kboard_keyword();
    $target = kboard_target();
    
    if(in_array($board_id, array('21','22','61'))){ // 실제 적용될 게시판의 ID값으로 변경해주세요.
        $date = date('Ym01000000', current_time('timestamp')); // 이번달 시작 날짜 기준
        if($keyword){
            $keyword = "%{$keyword}%";
            if($target){
                $where = "`date`&gt;='{$date}' AND `{$target}` LIKE '{$keyword}' AND `parent_uid`='0' AND `notice`='' AND (`status`='' OR `status` IS NULL OR `status`='pending_approval')";
            }
            else{
                $where = "`date`&gt;='{$date}' AND (`title` LIKE '{$keyword}' OR `content` LIKE '{$keyword}' OR `member_display` LIKE '{$keyword}') AND `parent_uid`='0' AND `notice`='' AND (`status`='' OR `status` IS NULL OR `status`='pending_approval')";
            }
        }
        else{
            $where = "`date`&gt;='{$date}' AND `parent_uid`='0' AND `notice`='' AND (`status`='' OR `status` IS NULL OR `status`='pending_approval')";
        }
    }
    
    return $where;
}



add_filter('kboard_content_get_thumbnail', 'my_kboard_content_get_thumbnail', 10, 3);
function my_kboard_content_get_thumbnail($thumbnail_url, $width, $height, $content){
	$board = $content-&gt;getBoard();

	if(!$thumbnail_url &amp;&amp; in_array($board-&gt;id, array('22','21','61','20','9','24','25','26','13','14','15','17','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','45','46','47','50','51','52','53','54','55','56','57','58','59','62')){ // 실제 게시판 id로 변경해주세요.
		$thumbnail_url = 'https://lomon.com/wp-content/uploads/kboard_attached/16/201908/5d4d995d461768214488.png';
	}
	
	return $thumbnail_url;
}

</code></pre>

<p>알려주신 코드를 array로 수정해서 올렸는데...</p>

<p>여전히 Parse error: syntax error, unexpected ';' in /lomon/www/wp-content/themes/Avada-child/functions.php on line 138</p>

<p>The site is experiencing technical difficulties. 에러코드가 뜨네요 ㅠ</p>]]></description>
			<author>James Sung</author>
			<pubDate>Wed, 28 Aug 2019 10:06:08 +0000</pubDate>
			<category>KBoard</category>
		</item>
				<item>
			<title><![CDATA[안녕하세요.

워드프레스에서 필터는 여러 개 추가하셔도 문제 되지 않습니다.

올려주신 코드를 보니 ...]]></title>
			<link>https://www.cosmosfarm.com/threads/document/36279</link>
			<description><![CDATA[<p>안녕하세요.</p>

<p>워드프레스에서 필터는 여러 개 추가하셔도 문제 되지 않습니다.</p>

<p>올려주신 코드를 보니 코드를 잘못 수정하신 듯합니다.</p>

<p>여러 개의 게시판에 적용하실 땐 $board-&gt;id == '1' 부분을</p>

<p>in_array($board-&gt;id, array('1','2','3')) 이런 식으로 교체해서 확인해보시겠어요?</p>

<p>고맙습니다.</p>]]></description>
			<author>스레드봇</author>
			<pubDate>Tue, 27 Aug 2019 23:46:12 +0000</pubDate>
			<category>KBoard</category>
		</item>
				<item>
			<title><![CDATA[
&amp;lt;?php 
function theme_enqueue_styles() {
    wp_enqueue_style( 'parent-style', get_templa...]]></title>
			<link>https://www.cosmosfarm.com/threads/document/36274</link>
			<description><![CDATA[<pre>
<code>&lt;?php 
function theme_enqueue_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( 'parent-style' ) );
}
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );


add_filter('kboard_list_where', 'today_best_kboard_list_where', 10, 3);
function today_best_kboard_list_where($where, $board_id, $content_list){
	$keyword = kboard_keyword();
	$target = kboard_target();
	
	if($board_id == '21'){ // 실제 적용될 베스트 게시판의 ID값으로 변경해주세요.
		$vote = '3';
		if($keyword){
			$keyword = "%{$keyword}%";
			if($target){
				$where = "`vote`&gt;='{$vote}' AND `{$target}` LIKE '{$keyword}' AND `parent_uid`='0' AND `notice`='' AND (`status`='' OR `status` IS NULL OR `status`='pending_approval')";
			}
			else{
				$where = "`vote`&gt;='{$vote}' AND (`title` LIKE '{$keyword}' OR `content` LIKE '{$keyword}' OR `member_display` LIKE '{$keyword}') AND `parent_uid`='0' AND `notice`='' AND (`status`='' OR `status` IS NULL OR `status`='pending_approval')";
			}
		}
		else{
			$where = "`vote`&gt;='{$vote}' AND `parent_uid`='0' AND `notice`='' AND (`status`='' OR `status` IS NULL OR `status`='pending_approval')";
		}
	}
	
	if($board_id == '22'){ // 실제 적용될 베스트 오브 베스트 게시판의 ID값으로 변경해주세요.
		$vote = '5';
		if($keyword){
			$keyword = "%{$keyword}%";
			if($target){
				$where = "`vote`&gt;='{$vote}' AND `{$target}` LIKE '{$keyword}' AND `parent_uid`='0' AND `notice`='' AND (`status`='' OR `status` IS NULL OR `status`='pending_approval')";
			}
			else{
				$where = "`vote`&gt;='{$vote}' AND (`title` LIKE '{$keyword}' OR `content` LIKE '{$keyword}' OR `member_display` LIKE '{$keyword}') AND `parent_uid`='0' AND `notice`='' AND (`status`='' OR `status` IS NULL OR `status`='pending_approval')";
			}
		}
		else{
			$where = "`vote`&gt;='{$vote}' AND `parent_uid`='0' AND `notice`='' AND (`status`='' OR `status` IS NULL OR `status`='pending_approval')";
		}
	}
	
	if($board_id == '61'){ // 실제 게시판 id로 적용해주세요.
		if($keyword){
			$keyword = "%{$keyword}%";
			if($target){
				$where .= "OR `board_id` IN ('20','9','24','25','26','13','14','15','17','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','45','46','47','50','51','52','53','54','55','56','57','58','59','62') AND `{$target}` LIKE '{$keyword}' AND `parent_uid`='0' AND `notice`='' AND (`status`='' OR `status` IS NULL OR `status`='pending_approval')";
			}
			else{
				$where .= "OR `board_id` IN ('20','9','24','25','26','13','14','15','17','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','45','46','47','50','51','52','53','54','55','56','57','58','59','62') AND (`title` LIKE '{$keyword}' OR `content` LIKE '{$keyword}' OR `member_display` LIKE '{$keyword}') AND `parent_uid`='0' AND `notice`='' AND (`status`='' OR `status` IS NULL OR `status`='pending_approval')";
			}
		}
		else{
			$where .= " OR `board_id` IN ('20','9','24','25','26','13','14','15','17','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','45','46','47','50','51','52','53','54','55','56','57','58','59','62')";
		}
	}
	
	return $where;
}

add_filter('kboard_allowed_board_id', 'my_kboard_allowed_board_id1', 10, 2);
function my_kboard_allowed_board_id1($allowed_board_id, $board_id){
	if($allowed_board_id == '21'){ // 베스트 게시판
		$allowed_board_id = array('21','22','61','20','9','24','25','26','13','14','15','17','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','45','46','47','50','51','52','53','54','55','56','57','58','59','62'); // 자신과 다른 게시판의 ID값을 입력
	}
	else if($allowed_board_id == '22'){ // 베스트 오브 베스트 게시판
		$allowed_board_id = array('22','21','61','20','9','24','25','26','13','14','15','17','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','45','46','47','50','51','52','53','54','55','56','57','58','59','62'); // 자신과 다른 게시판의 ID값을 입력
	}
             else if($allowed_board_id == '61'){ // 베스트 오브 베스트 게시판
		$allowed_board_id = array('22','21','61','20','9','24','25','26','13','14','15','17','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','45','46','47','50','51','52','53','54','55','56','57','58','59','62'); // 자신과 다른 게시판의 ID값을 입력
	}
	return $allowed_board_id;
}




add_filter('kboard_list_where', 'today_best_kboard_list_where', 10, 3);
function today_best_kboard_kboard_list_where($where, $board_id, $content_list){
    $keyword = kboard_keyword();
    $target = kboard_target();
    
    if(in_array($board_id, array('21','22','61'))){ // 실제 적용될 게시판의 ID값으로 변경해주세요.
        $date = date('Ym01000000', current_time('timestamp')); // 이번달 시작 날짜 기준
        if($keyword){
            $keyword = "%{$keyword}%";
            if($target){
                $where = "`date`&gt;='{$date}' AND `{$target}` LIKE '{$keyword}' AND `parent_uid`='0' AND `notice`='' AND (`status`='' OR `status` IS NULL OR `status`='pending_approval')";
            }
            else{
                $where = "`date`&gt;='{$date}' AND (`title` LIKE '{$keyword}' OR `content` LIKE '{$keyword}' OR `member_display` LIKE '{$keyword}') AND `parent_uid`='0' AND `notice`='' AND (`status`='' OR `status` IS NULL OR `status`='pending_approval')";
            }
        }
        else{
            $where = "`date`&gt;='{$date}' AND `parent_uid`='0' AND `notice`='' AND (`status`='' OR `status` IS NULL OR `status`='pending_approval')";
        }
    }
    
    return $where;
}



add_filter('kboard_content_get_thumbnail', 'my_kboard_content_get_thumbnail', 10, 3);
function my_kboard_content_get_thumbnail($thumbnail_url, $width, $height, $content){
	$board = $content-&gt;getBoard();

	if(!$thumbnail_url &amp;&amp; $board-&gt;id =='22','21','61','20','9','24','25','26','13','14','15','17','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','45','46','47','50','51','52','53','54','55','56','57','58','59','62'){ // 실제 게시판 id로 변경해주세요.
		$thumbnail_url = 'https://lomon.com/wp-content/uploads/kboard_attached/16/201908/5d4d995d461768214488.png';
	}
	
	return $thumbnail_url;
}
</code></pre>

<p>필터가 많아서 그런지 Parse error: syntax error, unexpected ',' in /lomon/www/wp-content/themes/Avada-child/functions.php on line 112</p>

<p>The site is experiencing technical difficulties. 오류가 뜨네요 ㅠ</p>]]></description>
			<author>James Sung</author>
			<pubDate>Tue, 27 Aug 2019 09:54:01 +0000</pubDate>
			<category>KBoard</category>
		</item>
				<item>
			<title><![CDATA[안녕하세요~^^

KBoard 플러그인 최신 버전을 사용 중이시라면

kboard_content_get_thumbnail 필터로 ...]]></title>
			<link>https://www.cosmosfarm.com/threads/document/36263</link>
			<description><![CDATA[<p>안녕하세요~^^</p>

<p>KBoard 플러그인 최신 버전을 사용 중이시라면</p>

<p>kboard_content_get_thumbnail 필터로 썸네일이 없을 때 기본 썸네일을 설정하실 수 있습니다.</p>

<p> </p>

<p>워드프레스 관리자 -&gt; 외모(테마 디자인) -&gt; 테마 편집기 페이지에서 functions.php 파일 하단에</p>

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

<pre>
<code class="language-php">add_filter('kboard_content_get_thumbnail', 'my_kboard_content_get_thumbnail', 10, 4);
function my_kboard_content_get_thumbnail($thumbnail_url, $width, $height, $content){
	$board = $content-&gt;getBoard();

	if(!$thumbnail_url &amp;&amp; $board-&gt;id == '1'){ // 실제 게시판 id로 변경해주세요.
		$thumbnail_url = '이미지주소';
	}
	
	return $thumbnail_url;
}</code></pre>

<p>위의 코드에서 $board-&gt;id == '1' 부분은 실제 게시판 id로 적용하신 후</p>

<p>이미지주소 부분에는 실제 이미지 주소로 교체해서 확인해보시겠어요?</p>

<p>고맙습니다.</p>]]></description>
			<author>스레드봇</author>
			<pubDate>Tue, 27 Aug 2019 07:20:48 +0000</pubDate>
			<category>KBoard</category>
		</item>
			</channel>
</rss>