• Well, I tried inserting some viewable coding into one of my pages, and it just wouldn’t work.

    <textarea> tag
    Inside the <textarea> tags, I attempted to insert the html opening tag and closing tag with an enter space in between:

    <textarea>
    <html>
    </html>
    </textarea>

    But, instead of it showing up as <html> [enter] </html>, it showed up (once I clicked “View Page”) as:

    <html><br />
    </html>

    I understand that I added breaks intentionally, but I didn’t want it to show up! If I were to use an HTML editor (like notepad) and I did that, it would never show up. I understand that WordPress is purposely doing it, and I was wondering how to avoid it. I like having breaks in between my opening and closing tags (for tutorials). It provides the reader with a better visual. Can you please help me out?

    <code> tag
    Now, I have another problem: whenever I tried to add the <code> </code> tag, with HTML in between, into WordPress’s “HTML editor”, it wouldn’t show up on my page (after I clicked “View Page”). Instead, it would leave a space where the code was suppose to be:

    HTML EDITOR:
    . . . you must type in <code><html> </html></code> in the beginning . . .

    VIEW PAGE:
    . . . you must type in in the beginning . . .

    Get me? What should I do to fix this problem???

    Thank you! ??

Viewing 1 replies (of 1 total)
  • WordPress isn’t designed to accept code for display on the page as is, the filters in place are too restrictive for that.

    In order to display code there are syntax highlighting plugins available that handle the display of code without the issue of code be parsed instead of simply showing on the page as you’d expect.

    Check some of these out, though be aware some do have their limitations and it may be a matter of trying them out to see which suits you best.
    https://www.ads-software.com/extend/plugins/search.php?q=syntax

Viewing 1 replies (of 1 total)
  • The topic ‘Textarea and code tag problems with WordPress’ is closed to new replies.