# WP Discourse: Erweiterte benutzerdefinierte Filter für discourse\_publish\_format\_html

**URL:** <https://meta.discourse.org/t/wp-discourse-advanced-custom-filter-for-discourse-publish-format-html/106059>\
**Category:** WordPress\
**Created:** [9. Januar 2019 um 14:35 UTC](https://meta.discourse.org/t/wp-discourse-advanced-custom-filter-for-discourse-publish-format-html/106059 "2019-01-09T14:35:02Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![bts](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bts/32/184556_2.png) [@bts](https://meta.discourse.org/u/bts)\
**Post date:** [9. Januar 2019 um 18:32 UTC](https://meta.discourse.org/t/wp-discourse-advanced-custom-filter-for-discourse-publish-format-html/106059/4 "2019-01-09T18:32:00Z")

</div>

Same, we just published a normal blog post, with ‘discourse\_publish\_format\_html’ filtered as follows:

```plaintext
function ccmm_discourse_publish_format_html()
{
	ob_start();
	echo "<h2>View on the Cracking the Code Platform:</h2><br />\n\n";
	the_permalink(); // The post's WordPress permalink
	$output = ob_get_clean();
	return $output;
}
add_filter('discourse_publish_format_html', 'ccmm_discourse_publish_format_html');

```

And only the “view on platform” part worked, not `the_permalink()`.

@simon I believe this is the first blog post we’ve published since upgrading to WP 5.0 (w/ Gutenberg editor), I wonder if that could have something to do with this?

---

_[View the full topic](https://meta.discourse.org/t/wp-discourse-advanced-custom-filter-for-discourse-publish-format-html/106059)._
