The discussion revolves around filtering pages and posts for a shortcode. oldManLemon is trying to publish full post content to a Discourse forum using the Avada theme, but encounters issues with shortcodes. simon suggests publishing an excerpt of the post and allowing users to view the full post by clicking a button, which should properly render shortcodes.
However, oldManLemon experiences issues with the “Show Full Post” button, which gets stuck on loading. simon offers to help troubleshoot the issue if oldManLemon can share a link to the post. Since the site is behind a firewall, oldManLemon shares the console error instead.
simon suggests that the firewall might be causing the problem and recommends creating custom excerpts for posts or deselecting the WP Discourse Use Full Post Content option. Alternatively, code can be added to hook into the WP Discoursewp_discourse_excerpt filter.
I am currently trying to use post full page/comment to the discussion area of my forum. I have chosen to do this because I we are using Avada theme which comes with pages builder.
Shortcodes are a real problem if you want to publish the full post content. Take a look at the Dealing with WordPress shortcodes section of this topic for a few ways of dealing with them: WP Discourse plugin tips and tricks.
The easiest approach would be to publish an excerpt of the post to Discourse and then allow users to see the full post by clicking on the Show Full Post button. When that is done, the shortcodes should be properly rendered in the expanded post.
Yeah I just noticed in my trails and tribulations that it seems to filter well in this case. The reason I was trying to avoid it was because if you click show full post it just changes to loading and never gathers to the full post. I was thinking that might have something to do with the shortcodes. Do you have any suggestions?
It would be good to sort out what the problem is with expanding the posts. If you can share a link to a post on your WordPress site, I’ll take a look at it. You can either post a link in this topic, or send it to me in a private message.
I unfortunately it is behind a firewall as it is for an internal company. I can route it to a different address to face it outwards temporaily. Would that bother installation if its address changed?
The easiest solution in the short term would be to create custom excerpts for the posts that you publish to Discourse and deselect the WP Discourse Use Full Post Content option. If this isn’t possible with the Avada theme then some code will have to be added that hooks into the WP Discoursewp_discourse_excerpt filter.