WordPress.org

Ready to get started?Download WordPress

Forums

How to retain the text in HTML editor (3 posts)

  1. wpjongleur
    Member
    Posted 1 year ago #

    I added the following code, but the html editor within wordpress adds BR tags and changes the "&" to "&#0338".

    How do I retain this code as is in a WP page?

    <iframe id="forum_embed"
      src="javascript:void(0)"
      scrolling="no"
      frameborder="0"
      width="630"
      height="700">
    </iframe>
    <script type="text/javascript">
      document.getElementById('forum_embed').src =
         'https://groups.google.com/a/mywebsite.com/forum/embed/?place=forum/xplore'
         + '&showsearch=false&showpopout=false&showtabs=false'
         + '&parenturl=' + encodeURIComponent(window.location.href);
    </script>
  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    The HTML editor is just for HTML.
    You ought to enqueue your javascript instead.

  3. wpjongleur
    Member
    Posted 1 year ago #

    Could you please tell me how to do that? Where would I put the code i have here and where and how would I use enqueue? please help.
    thanks,
    Jongleur

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.