In a WordPress support thread titled “Discourse Publishing Link for Custom Post Type Disappears,” TEKFused reports that while the Discourse publishing feature successfully creates topics for custom post types (CPTs) created via Meta Box, the publish link fails to appear in the wp-admin editor—despite the discourse_permalink meta key existing in the database. Default WordPress posts work fine. angus confirms the issue is specific to CPTs and asks for logs and screenshots. After further troubleshooting and sharing logs, angus identifies the root cause: the CPT must explicitly support custom-fields in its registration arguments. Enabling this—either via code or Meta Box’s UI settings—resolves the issue. TEKFused confirms the fix works and thanks angus for the solution. The issue was not with the WP Discourse plugin, but with missing CPT support for custom fields.
The Discourse publish feature does create a topic for a custom post type, however, the link doesn’t appear in wp-admin. I have checked in the WordPress database under post_meta, and the “discourse_permalink” key for that post exists, but for some reason the link doesn’t show up.
I created the custom post type with Meta Box. This seems to be an issue with custom post types specifically. The default WP posts work fine and show the link in wp-admin.
Regarding question 2, it acts as if there was no link and allows me to publish a new post, or link to the topic. If I publish or link, result is the same - the interface from your screenshot shows no link, although it appears in the DB under post_meta for that post.
Ok, I’ll attempt to re-create this issue later this week.
In the meantime if there are any PHP logs for your instance you can share, that would be helpful. Also take a look at the WP Discourse logs for any hints.
When you download the logs the zipped folder will include the metafile. You can PM it to me here.
Are you sure there are no logs for your Wordpress instance more broadly? My gut says that there’s some kind of exception occurring that is preventing the sidebar logic from working properly. Could you try this for me:
When editing a post where you see the issue occuring
Hi @angus I’m sorry for the delay, I thought you were talking about the logs in Discourse, I realize now you are wanting the WordPress plugin’s logs.
I’ve sent you the files! I actually tested disabling all plugins except for the ones below and reverting to the 2023 theme as well, and the same issue persists. No logs related to this issue, same as before.
Your issue is not with the WP Discourse plugin. You need to enable custom-fields support in the code that registers the Meta Box custom post types you’re using. The WP Discourse sidebar will then work as expected.
Hi @angus that did the trick, thanks very much!! I ticked the “Custom Fields” box in the Meta Box CPT settings, and now the link shows up in the wp-admin editor!