Unable to post code via Github GISTS from my wordpress site
-
Hey Team,
I followed the steps to show code using GISTS but unluckily I was unable to. Please suggest any documentation links for reference.
Thank you.
WP.com: Yes
Correct account: YesThe blog I need help with is: (visible only to logged in users)
-
If you want to show code on your site, you must use the Code Block, https://wordpress.com/support/wordpress-editor/blocks/code-block/
-
-
The Code Block is the only way to show code on a free wordpress.com website. But you can’t use GISTS on the wordpress.com platform.
-
Hi,
Thank you for the reply, when i use HTML block and paste the GITHub GIST Embed code…it is working fine when i preview but doesnt work when published.
Please suggest.
Thank you.
-
That’s because the code you can use on the wordpress.com platform is very limited. As I already said, you can’t use GISTS on the wordpress.com platform.
-
-
Hi there,
To embed GitHub Gists on your WordPress.com site, just paste in the Gist URL – it will embed automatically via the oEmbed protocol.
https://wordpress.com/support/gist/
But the embed code method won’t work here, as that uses JavaScript code which isn’t allowed on WordPress.com for security reasons.
https://wordpress.com/en/support/code/
Just to be clear, your code in the Gist can contain JavaScript, as that’s the code that will be displayed. It’s just not possible to add JavaScript that needs to be executed, for example, when used to embed something on your site.
Let me know if you have any questions about this.
- The topic ‘Unable to post code via Github GISTS from my wordpress site’ is closed to new replies.