# Use Generic Copy Whenever Publishing a Post

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

<div class="post-metadata">

### Author: ![apautler](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@apautler](https://meta.discourse.org/u/apautler)
#### Post date: [Juin 1, 2017, 7:54 UTC](https://meta.discourse.org/t/use-generic-copy-whenever-publishing-a-post/63764/1 "2017-06-01T19:54:16Z")

</div>

@simon Right now whenever you publish a post from WordPress to Discourse the two options are excerpt or full post. Is it possible to simply have generic text (ex. Have a comment or question about this lesson? Start the discussion here.)? We are really just using Discourse to use as the discussion platform and bringing over the text from the post in WordPress doesn’t make a lot of sense.

---

<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: [Juin 1, 2017, 8:20 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' );

```

---

<div class="post-metadata">

### Author: ![apautler](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@apautler](https://meta.discourse.org/u/apautler)
#### Post date: [Juin 1, 2017, 9:33 UTC](https://meta.discourse.org/t/use-generic-copy-whenever-publishing-a-post/63764/3 "2017-06-01T21:33:12Z")

</div>

This worked perfectly, thank you!
