# WP-discourse: how to deal with shortcodes in post

**URL:** <https://meta.discourse.org/t/wp-discourse-how-to-deal-with-shortcodes-in-post/58838>\
**Category:** WordPress\
**Created:** [10. März 2017 um 17:15 UTC](https://meta.discourse.org/t/wp-discourse-how-to-deal-with-shortcodes-in-post/58838 "2017-03-10T17:15:03Z")\
**Posts on this page:** 1\
**Showing post:** 5

<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:** [8. September 2019 um 11:25 UTC](https://meta.discourse.org/t/wp-discourse-how-to-deal-with-shortcodes-in-post/58838/5 "2019-09-08T11:25:46Z")

</div>

Hey @simon

I used your template to customize the `discourse_publish_format_html` to display all posts in an iframe. Yet the src parameter of the iframe output is empty. See here:

[https://forum.cannabisanbauen.net/t/ist-meine-pflanze-maennlich-was-tun/7196](https://forum.cannabisanbauen.net/t/ist-meine-pflanze-maennlich-was-tun/7196)

**Any idea why?** Below is my code:

```plaintext
// show post in iframe 
function your_namespace_publish_format_html( $output ) {
    global $post;
	?>
    <iframe width="690" height="2000" src="<?php echo esc_url( the_permalink() ); ?>" frameborder="0"></iframe>
	<?php
	$output = ob_get_clean();

    // Return the default output, or do something else with it here.
    return $output;
}
add_filter( 'discourse_publish_format_html', 'your_namespace_publish_format_html' );

```

---

_[View the full topic](https://meta.discourse.org/t/wp-discourse-how-to-deal-with-shortcodes-in-post/58838)._
