# Use Generic Copy Whenever Publishing a Post

**URL:** https://meta.discourse.org/t/use-generic-copy-whenever-publishing-a-post/63764
**Category:** WordPress
**Created:** [June 1, 2017, 7:54pm UTC](https://meta.discourse.org/t/use-generic-copy-whenever-publishing-a-post/63764 "2017-06-01T19:54:16Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [June 1, 2017, 8:20pm UTC](https://meta.discourse.org/t/use-generic-copy-whenever-publishing-a-post/63764/2 "2017-06-01T20:20:03Z")

</div>

You can do this by customizing the template that is used to send the WordPress content to Discourse. There is some information about how to do that here: [Customize the structure of WP Discourse templates](https://meta.discourse.org/t/wp-discourse-template-customization/50754)

Adding something like this to your `functions.php` file should work. Insert whatever html you want to use between the closing and opening php tags.

```plaintext
function your_namespace_publish_format_html() {
	ob_start();
	?>

    <p>Generic content to be published to Discourse with every WordPress post...</p>

	<?php
	$output = ob_get_clean();

	return $output;
}
add_filter( 'discourse_publish_format_html', 'your_namespace_publish_format_html' );

```

---

_[View the full topic](https://meta.discourse.org/t/use-generic-copy-whenever-publishing-a-post/63764)._
