# WP Discourse Publishing with a default user, and grabbing the actual WP post 'created\_at' date

**URL:** <https://meta.discourse.org/t/wp-discourse-publishing-with-a-default-user-and-grabbing-the-actual-wp-post-created-at-date/419160>\
**Category:** WordPress\
**Created:** [December 4, 2026, 6:05pm UTC](https://meta.discourse.org/t/wp-discourse-publishing-with-a-default-user-and-grabbing-the-actual-wp-post-created-at-date/419160 "2026-12-04T18:05:49Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)\
**Post date:** [December 5, 2026, 1:38am UTC](https://meta.discourse.org/t/wp-discourse-publishing-with-a-default-user-and-grabbing-the-actual-wp-post-created-at-date/419160/2 "2026-12-05T01:38:46Z")

</div>

Hey there @kiefferr, thanks for the post! I can help you out with these.

> [@kiefferr](#):
>
> 1. We’re looking to publish a bunch of FAQs posts as topics and we want the default ‘system’ user to always show as the author of those posts. But the setting below has no effect on which author gets picked up

That setting sets the default publishing user, it’s not a publishing user override. What you want is the `wpdc_discourse_username` filter. See here

> [@WP Discourse Filters and Actions](https://meta.discourse.org/t/wp-discourse-filters-and-actions/307211#p-1513119-wpdc_discourse_username-21):
>
> These are all actions and filters provided by the [WP Discourse](https://github.com/discourse/wp-discourse) plugin. Examples are illustrative only. You will need to test and validate the example on your own instance before using it in production. Filters For a general explanation on how you can use filters in Wordpress see Publishing [WP Discourse](https://github.com/discourse/wp-discourse) publishing filters. discourse\_post\_types\_to\_publish Filter the post types which appear in the “Post Types to Publish” setting post type list. Note that this will not enable or disable discour…

Here’s how it might work for your use case:

```php
add_filter( 'wpdc_discourse_username', function () {
        return 'system';
} );

```

> [@kiefferr](#):
>
> 1. Separately, when publishing posts it would be great for Discourse to pickup the actual Published date of the WP post

It’s not designed to work like that for a few reasons, but if you want that behaviour, there’s a filter that can help you here too: `wpdc_publish_body` (see the same topic for more details). Here’s how it might work for you use case:

```php
add_filter( 'wpdc_publish_body', function ( $body, $type, $post_id ) {
        if ( 'create_post' === $type ) {
                $body['created_at'] = get_post_time( 'c', true, $post_id );
        }
        return $body;
}, 10, 3 );

```

Let me know how you go with those.

---

_[View the full topic](https://meta.discourse.org/t/wp-discourse-publishing-with-a-default-user-and-grabbing-the-actual-wp-post-created-at-date/419160)._
