Time difference between Discourse and WP


(Stephanie) #1

I have a new install of Discourse. It is giving the correct time stamps to the posts.

I also WP-discourse-shortcodes to grab a list of topics for my WP pages. But when the discourse topics show up on WP, they all have the timestamp of 1970/01/01.

I’m not sure why it is doing that or how to fix it. I have a webhook enables for the “latest” shortcode.

Any thoughts on this would be appreciated!


(Simon Cossar) #2

It has to do with the time format that is being returned from your server. I can fix that this weekend. I’ll let you know when the plugin has been updated.


(Stephanie) #3

Oh wow thanks! I love having this feature for my membership so I really appreciate you keeping up this plugin.


(Simon Cossar) #4

The plugin has been updated. You can download it from GitHub here: GitHub - scossar/wp-discourse-shortcodes: Extends the wp-discourse plugin by adding shortcodes that can be used to link to the Discourse forum.. The update should fix the problem with the dates all displaying as 1970/01/01. Let me know if it doesn’t.

Recent changes to the Discourse Groups routes have broken the discourse_groups shortcode for sites that are on the latest version of Discourse. The fix for that is fairly simple. I’ll update the plugin again later this weekend.

Edit: the plugin caches the HTML that it creates from the Discourse content. You can get fresh content by clicking the Update button on any post or page that has a discourse_topics shortcode on it.


(Stephanie) #5

Works perfectly! Thanks for such a quick update.