WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As we're evaluating whether we should build a Wordpress plugin and in that context I'm trying to figure out how Wordpress handles script tags in a post?

What's the default setting?


share|improve this question

Scripts shouldn't go inside the body of a post, but it is possible for administrator level users.

See the codex info on Javascript_in_Posts.

If you need JS inside a post, chances are you're approaching it from the wrong angle, content should go in the content area, not code.

However if you're looking to run code when something specific appears in a post, a better approach(imho) is to use a shortcode(or several), you can read more about them here.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.