본문 바로가기
그리고/ㆍ워드프레스

워드프레스 자바스크립트 왜 안 돼냥

by diMik 2020. 10. 11.

 

워드프레스 페이지에 자바스크립트를 넣고 싶은데, 넣고나서 미리보기로 확인해보면, 코드가 그대로 노출되고 제대로 표현되지 않는 문제가 있다.

 

구글에서 검색해보니, 워드프레스닷컴 사이트 자체에 이유와 해결법이 명시되어있었다.

 

 

 

JavaScript
  • JavaScript may be used with sites on our Business plan with plugins installed.
  • For security reasons, sites on the Premium Plan and below are not allowed to post JavaScript.
  • This is because JavaScript can be used for malicious purposes. As an example, JavaScript has taken sites such as MySpace.com and LiveJournal offline in the past.
  • The security of all WordPress.com sites is a top priority for us, and until we can guarantee scripting languages will not be harmful, they will not be permitted.
JavaScript from trusted partners, such as YouTube and Google Video, is converted into a WordPress shortcode when a post is saved.

 

 

요약하자면,

 

이유 : 악의적 목적으로 자바스크립트를 사용하여 사이트에 위협을 줄까봐.

해결법 : 프리미엄플랜보다 높은 요금제(비즈니스$25/매달, 이커머스$45/매달)를 가입한 뒤 플러그인을 설치하여 사용해라.

 

나는 아직 유료요금제로 안 넘어간 상황이다. 기본적인 페이지 구성을 다 마치고 사이트를 오픈한 다음에 결제할 예정이다.

댓글