Use WP Discourse to publish posts from Wordpress to Discourse

Hi Angus,

Great plugin and great instructions.

I just installed and configured WP-Discourse. It looks like it is working however I see some html tags come in my post on Discourse from Wordpress which is likely related to the Theme I am using on Wordpress.

Quick check, I assume it is 1 direction, right? So a Wordpress post gets published on Discourse. If I then make changes in that discourse post (e.g. remove the html tags) this doesn’t get synchronized with Wordpress. Right?

I will make a new post to test and see if this happens all the time (as I just published an old post to Discourse to see if it worked).

Thanks and regards,
Pieces

2 Likes

Hey @Pieces

Are these appearing in the published version of the discourse post or only when you edit it?

Yes that’s right.

They appeared when I updated a previously published Wordpress post to be posted on Discourse (right after installing Discourse). So they appeared in a published Discourse post.

I am using Avada theme for Wordpress.

Could you link me to where this is happening on your community?

1 Like

Sure. My forum can be found here, my Wordpress can be found here.

It was the Ragnarok post that had the HTML in it when published. I did change it on Discourse though so it won’t show. I will likely publish a new post tomorrow so will test it again and let you know if it happens again.

Thanks for your support, much appreciated.

Yes please let me know if this happens again and I’ll take a look straight away. Please also make a note of the circumstances that lead to the issue, i.e what exactly you’re doing when you create the Wordpress post.

1 Like

Hello, thank you for this very usefull plugin.

Is there a way to fix the template of the discourse post.On each update the template is erased and replaced by the default one.

Thx.

Hey @sedget,

Thank you for your feedback! Could you go into a bit more detail of what you mean by:

  • “each update” - Are you updating Wordpress, Discourse or the plugin itself?
  • “template is erased” - Could you explain what you mean by template and what you mean when you say it’s being “erased”

Thanks :slight_smile:

Hello,

i’m going to try to be more clear :slight_smile:

We have the ability to customize the publish template Add the featured_image to the publish template

This allow us publishing message into our discourse forum from WP post including the featured image (exemple below)

When the WP discourse plugin is updated in wordpress, this customization is reset to default configuration and each time we have to reconfigure the template. the default configuration display message without featured image

So my question is : Is there a way to keep the template active and protected from reset when we update wp discourse plugin in wordpress?

Thank you for reading :slight_smile:

regards

Really great plugin, was just wondering if there was a way to customize a couple of things. As you can see in the screenshot, there’s no space between the word “Comments” and the first comment. Second, the user icons are about 50% too large. Last, I’d like to hide the participants section as I see no use for it.

Any help fixing this would be appreciated!

Figured out the spacing and removing the participants section but still cannot figure out how to reduce the avatar size by half. Also, I notice with longer user names they overlap the date on mobile phones.

One suggestion I’d like to see for this plugin is to add a widget that can be used in the sidebar to show the most recently active threads on discourse.

Hello, for some reason YouTube videos are not showing in the Discourse. So they are added in WordPress but once we publish a post and we push it to the Discourse, the video is not shown. Probably because it’s buried under the WP code?

<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio">
<div class="wp-block-embed__wrapper">
<span class="embed-youtube" style="text-align:center; display: block;"><iframe loading="lazy" class="youtube-player" width="640" height="360" src="https://www.youtube.com/embed/IpY_IMjT9Ik?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en-US&#038;autohide=2&#038;wmode=transparent" allowfullscreen="true" style="border:0;" sandbox="allow-scripts allow-same-origin allow-popups allow-presentation"></iframe></span>
</div>
</figure>

This code is from a Discourse topic created by WP.

Any ideas on how to make this work?

You can’t see any content by short codes either. Discourse should do PHP of WordPress in such situation, but it can’t so the plugin is showing only more or less preview/just text/images/”passive” content.

I don’t know anything but I can’t see how Discourse could parse PHP through a plugin.

As I see this WP Discourse connects a topic to WP-post as commenting system. WP Discourse is not an importer or mirror from WP-post to a topic as you are trying to use it now.

2 Likes

Hey @angus, I got Discourse to show up of Wordpress in the Post section on the Top right corner and it does create posts in the Discourse forum. However, I was wanting to use Jet Engine Plug In with Wordpress and use Discourse with it.

Then when I go to test out Jet Engine and the Post sections doesnt work. The Discourse icon at the top right went AWOL. Is this normal? Is there a way to Enable it or bypass this?

I have been testing with embedding directly from the forum into each individual post but I can’t seem to get the embeds to work correctly too. Curious to hear your thoughts

Hey @ethanjs,

I haven’t used JetEngine before, but it looks like it’s employing it’s own sidebar. The WP Discourse sidebar integrates with the standard Wordpress sidebar hooks and endpoints, so unless JetEngine supports those, the WP Discourse sidebar won’t show up in JetEngine’s custom sidebar. Essentially, this is more of a JetEngine issue. You could reach out to them and ask why items in your standard post sidebar don’t show up in their sidebar.

Check out my response to this recent support topic on this one

1 Like

@angus Thank you for the help!

I contacted Jet Engine Support as you recommended. They mainly said that they can’t guarantee full compatibility with any third-party plugins.

I attempted to see if the ACF widget (Advanced Custom Fields) post type would work too. Which it had the same issue where the Discourse Plugin as Jet Engine which it wouldn’t show the widget in the top right corner when creating posts. My main goal was to put a Discourse comment section on each Dynamic page. It appears the only way to go about this is not to use either of them and use the standard Post section. Using the WP All Import plugin to transfer all of the posts.

I did notice the Discourse block within the left side column on Gutenberg within the Jet Engine Post type. It doesn’t display Discourse within the top right corner as it does on the original post section.

The image below shows the Gutenberg editor with the Discourse comment section. Problem is it doesn’t show up when previewing the post. Also, since I used Elementor to create the post I’m not sure how to transfer it over.

From what I am seeing this likely won’t work since the Discourse widget isn’t in the top right corner. I’m still attempting to figure out how to embed directly on to the page from the Discourse forum.

Hey @ethanjs,

If Jet Engine are providing a custom Wordpress post creator that doesn’t support any third party plugins, I think that’s your essential problem. I can help you further with specific issues concerning the WP Discourse plugin, but I’m afraid I can’t be of much help with Jet Engine’s custom post creator.

How do I leave only the link?

example: Samsung inicia fabricação de telas para o iPhone 15 e deve ampliar produção - Tecnoblog - Tecnoblog Comunidade

Check out this section of this topic

Since the last update of WP-Discourse Version 2.5.0 when I publish blog posts they are now set to “unlisted” in Discourse. Even though I have that option unchecked (never changed it):

Was this a change in version 2.5.0? To my knowledge, nothing has changed on my end.