Forum breadcrumbs – You are here:Asgaros Support ForumSupportScript-based widgets
Please or Register to create posts and topics.

Script-based widgets

We use an external tool that allows us to embed a widget with a bit of short javascript. On normal blog posts this works fine. We just switch to HTML view, paste in the bit of code, and the widget appears. Wordpress seems to treat it sort of like embedded media. It’s come up that we want to display these widgets on our forum posts, but I can’t figure out how to do it. If I try to insert code, it doesn’t work. If I insert as a media link, it recognizes the size of the object, so it’s seeing something, but it just displays as a black box. I’ve tried every way I can think of. If you could let me know what I haven’t thought of, that would be great. Of let me know if it’s not possible to display in the forum. Thank you!

Hello @roughtrade

Its not possible to insert JavaScript into forum posts via the editor because of security reasons. Otherwise users could insert malicious scripts which read cookies/login-data/passwords etc from other users reading that malicious forum post.

If you want to use some special content I would suggest you to include it via shortcodes (enable the option in the settings before).

The black box can be caused by some stylings of your theme or another plugin. Embedding tweets/youtube/facebook links works without problems on a standard installation.

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!