style and script tags inside posts not recognized
-
Hello there,
I’m trying to insert custom html code into a post on my website through a ‘Custom HTML’ block. The code has style and script tags but these tags gets stripped out and their content shows up as plain text.
Is it true that websites hosted on wordpress.com can’t have style and script tags inside posts/pages? if so, is there an easy solution?The blog I need help with is: (visible only to logged in users)
-
Hey there,
Is it true that websites hosted on wordpress.com can’t have style and script tags inside posts/pages?
Correct – we do not allow certain tags on WordPress.com, for security reasons, including JavaScript, Flash, iframe, form, and input tags.
These restrictions are in place to prevent any disruptions in service due to potentially malicious code.
You can read more about this here:
if so, is there an easy solution?
The only option you would have on WordPress.com is to upgrade to the Business Plan which allows the embedding of any code:
Otherwise, going the self-hosted route via the open WordPress.org software may be a better option.
Let me know if you have any questions.
Thanks!
-
Thank you for the prompt response. I understand why stuff like JavaScript and flash wouldn’t be allowed but what about style tags? why aren’t they allowed?
-
You can use them, but it would require a WordPress.com Premium or higher plan: https://en.support.wordpress.com/custom-design/custom-css/
- The topic ‘style and script tags inside posts not recognized’ is closed to new replies.