Damian_Boon reported an issue when sharing posts from WP Admin using the WP Discourse plugin. When clicking the “Show Full Post” button, the text from the footer was displayed instead of the post content. simon explained that this was not a bug, but rather a configuration issue. The embed whitelist selector site setting needs to be configured to tell Discourse what content is the main post content.
simon provided a link to the documentation on how to configure the setting and advised that the post data is cached for 10 minutes. Damian_Boon shared an example of a post where the issue didn’t occur, and simon explained that the success depends on the content of the embedded post. Damian_Boon thanked simon and agreed to look into configuring the setting.
It’s not a bug. When the “Show Full Post” button is clicked, Discourse attempts to find the post content from its URL. You can tell Discourse what content is the main post content by configuring the Discourse embed whitelist selector site setting.
Details about the setting are here: Configuring allowed embed selectors. Since you have a WordPress site, there is a good chance that the example setting in the topic’s “Finding the CSS selectors to target” section will work for you. When testing this, remember that the post data that’s pulled from WordPress is cached for 10 minutes, so you may have to wait up to 10 minutes to see if your setting is correctly configured.
When the embed whitelist selector site setting is not configured you will often get the correct post content pulled to Discourse. It depends on the content of the embedded post. For example, I create a lot of test posts with the content “This is a test, this is only a test.” Discourse is not able to retrieve that post content from my WordPress site unless I configure the setting. If I create a longer post, Discourse finds the correct content when the embed whitelist selector setting is not configured.