# WP Discourse 오류 메시지: 32000자 초과

**URL:** <https://meta.discourse.org/t/wp-discourse-error-message-longer-than-32000-characters/132132>\
**Category:** WordPress\
**Created:** [10월 29, 2019, 11:16오전 UTC](https://meta.discourse.org/t/wp-discourse-error-message-longer-than-32000-characters/132132 "2019-10-29T11:16:39Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![jrgong](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@jrgong](https://meta.discourse.org/u/jrgong)\
**Post date:** [10월 29, 2019, 11:16오전 UTC](https://meta.discourse.org/t/wp-discourse-error-message-longer-than-32000-characters/132132/1 "2019-10-29T11:16:39Z")

</div>

안녕하세요  
@simon 이 문제를 아시는 분 계실까요?

[이 게시물](https://www.cannabisanbauen.net/komplettsets/)을 링크된 디스커스(Discourse) 토픽으로 업데이트하려고 했는데, 32,000자를 초과했다는 오류 메시지가 뜨네요. 실제로는 그렇지 않은데 말입니다. 디스커스에 게시물을 게시하는 것 자체는 문제없이 잘 되었는데요.

[![](https://global.discourse-cdn.com/meta/original/3X/2/0/20e2ce46740259f92a0bc1367c28bc6fa0986250.png) ](https://dl.dropboxusercontent.com/s/syqx1jjwsgsn4py/Screenshot%202019-10-29%2015.15.01.png?dl=0)

참고로 저는 다음과 같은 functions.php 항목을 사용 중입니다:

```php
// show wp posts embedded in discourse via iframe
// https://meta.discourse.org/t/wp-discourse-how-to-deal-with-shortcodes-in-post/58838/5
add_filter( 'discourse_publish_format_html', 'wpdc_custom_discourse_publish_format_html', 10, 2 );
function wpdc_custom_discourse_publish_format_html( $output, $post_id ) {
    $permalink = get_the_permalink( $post_id );
	$content_post = get_post( $post_id );
	$content = $content_post->post_content;
	$content = apply_filters('the_content', $content);
	$content = str_replace(']]>', ']]&gt;', $content);

	ob_start();
	?>
		
    <iframe width="690" height="2000" src="<?php echo esc_url( $permalink ); ?>" frameborder="0"></iframe>
	<div data-hide="true"><?php echo $content; ?></div>
		
	
	<?php
		
    $output = ob_get_clean();

    return $output;

}

// upwork by njegos vukadin

add_action( "wp_head", "detect_embedding", 1 );
add_action( "wp_head", "modify_embedded_links", 11 );

function detect_embedding()
{
?>
<script>
    function isEmbedded () {
	    try {
	        return window.self !== window.top;
	    } catch (e) {
	        return true;
	    }
	}
	if( isEmbedded() ){
		document.documentElement.className = document.documentElement.className + " embedded";
	}
</script>
<style>
	.embedded body > *:not(#page),
	.embedded #main > *:not(article),
	.embedded #right-sidebar {
		display:none!important;
		visibility:hidden!important;
	}

	.embedded #main {
		margin:0;
	}

</style>
<?php
}

function modify_embedded_links(){
?>
<script>
    jQuery(document).ready(function($){
		if( isEmbedded() ){
			$("a").filter(function(){
				return this.href.split("#")[0] !== window.location.href.split("#")[0];
			}).attr("target","_blank");
		}
	})
</script>
<?php
}

```

---

_[View the full topic](https://meta.discourse.org/t/wp-discourse-error-message-longer-than-32000-characters/132132)._
