tags in documentation
-
Hello there!
I’m trying to publish a code sample in my WordPress article, but it seems like the <script> tag is not permitted.
I’ve been looking for support articles to help, but so far, none of the solutions I tried seem to work (like adding
andtags to the script) Is there an html tag that I can add to the snippet so it displays in the article? Any guidance you can provide would be much appreciated. Thanks!
The blog I need help with is: (visible only to logged in users)
-
Hi!
You’ll want to use the [code] shortcode to embed a code sample in your WordPress article.
For example, if you want to publish an HTML code sample, try this:
[code language="html"] your code here [/code]Here's the full resource on how to post source code: https://en.support.wordpress.com/code/posting-source-code/
Specific HTML tags are allowed. The <script> tag is not one of them. More info on that: https://en.support.wordpress.com/code/
Hope this helps and let me know if you have any questions!
-
Oops, let me clarify that a bit more. You can add any tags to a code sample inside the [code] shortcode.
But if you're trying to add a <script> tag to a page, post, or widget; it won't work.
- The topic ‘tags in documentation’ is closed to new replies.