Code Block
-
When I add code to the code block it’s not recognizing it, can you please advise?
WP.com: Yes
Correct account: YesThe blog I need help with is: (visible only to logged in users)
-
Hi there,
Can you provide a bit more detail? For example, what code are you adding, and in what way is the block not recognising it? Can you give a link to the post where you’ve added the code (or the title if it’s still a draft)?
The code block is used for posting code on your site so your readers can see the actual code itself. If you’re perhaps expecting the code to be rendered, that won’t happen with any code you add inside a code block.
For that you instead want to add the code in a Custom HTML block, but keep in mind there are restrictions on the types of code we allow to be embedded on a WordPress.com site, and if you, for example, try to use
iframe,form, orscriptcode, it will be stripped out automatically when you save/publish your post:https://wordpress.com/en/support/code/
https://wordpress.com/en/support/wordpress-editor/blocks/custom-html-block/
- The topic ‘Code Block’ is closed to new replies.