Truncate the embedded posts - showing the wrong article

Hi,

when i enable this function

image

Sometimes the wrong wordpress post shows when i click on the button to display the whole article. Sometimes its fine, sometimes its mixed up. Any idea what could be the issue?

When you click the Show Full Post button, Discourse attempts to get the post content based on the topic’s embed URL. Generally this works, but it can fail due to the WordPress post’s markup. To fix this, you need to configure the Discourse embed whitelist selector setting. You can find details about how to do that in this topic: Configure the Allowed Embed Selectors Setting.

There is a fairly good chance that adding the following value to your site’s embed whitelist selector setting will fix the problem for you:

article .entry-content img, article .entry-content p, article .entry-content ul

You will need to test that. If it isn’t working, you will need to go through the steps given in the “Finding the CSS selectors to target” section of the topic that I linked to.

2 Likes

Would you be so kind to give me the exact values for my website?

Here is link to one article:

I tried adding article .mvp-post-content and mvp-post-content as well as your suggestions above, but it didnt work. When i click on Show Full Post it shows nothing but a link, so i must be using the wrong elements.

There is a lot of markup on that page. I’m not surprised that Discourse is having trouble finding the main post content. Try this to see if it grabs the main content:

article .mvp-main-box #mvp-post-main

The results are cached for 10 minutes, so you will have to wait up to 10 minutes to know if the changes are correct.

You could also try just using article for the setting. It is possible that will work.

1 Like