WordPress.org

Ready to get started?Download WordPress

Forums

Disable HTML code (26 posts)

  1. piero06
    Member
    Posted 9 years ago #

    Hi,

    i want to insert in a post a code HTML, but i want to show it as text not to be interpetate as code HTML of the page.

    What i shall do ?

    Thans

  2. lipa
    Member
    Posted 9 years ago #

    How about placing it between <pre> and </pre> tags?

  3. piero06
    Member
    Posted 9 years ago #

    No, i want to show a code html, for example

    <input type="text">

    It shouldn't be see as HTML from the browser...

  4. Michael Bishop

    Posted 9 years ago #

    why not use the code tag and backticks?
    I think I'm confused. You want the person viewing the site to see the code, or you want the page to interpret the code, and the browser to output something?

  5. piero06
    Member
    Posted 9 years ago #

    I want that the page doesn't interpert the code !

  6. Michael Bishop

    Posted 9 years ago #

    edit
    ugh code quicktag doesn't work like that when posting through wordpress like it does in the forum.

  7. lbessant

    Posted 9 years ago #

    You need to encode the < as & lt; and > as & gt; (remove the space between the & sign and the letters)

  8. Mark (podz)
    Support Maven
    Posted 9 years ago #

  9. Michael Bishop

    Posted 9 years ago #

    How nifty is that. quite the site you got there podz, guess I need to poke around it some more.

  10. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Heh - noo...that simplecode is not mine at all. It's only there because I kept losing the url for the orginals or they dropped offline.
    I would LOVE for that to be made into a plugin though.

  11. Michael Bishop

    Posted 9 years ago #

    How is it that it works here on the bb with the backticks?

  12. lbessant

    Posted 9 years ago #

    Because bbPress is a different product for a different purpose.

  13. Michael Bishop

    Posted 9 years ago #

    It's really getting old with members treating others like they don't have common sense.
    My question wasn't "why does it work here and not WP", for which your reply could have worked.
    I really grasp the difference between the two "products". But since the conversation was moving towards the "plugin", I was inquiring as to whether podz, or someone else, knew how the feature was implemented on this board.

  14. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Ah .... you mean why can't someone take the way that the backtick is used here and transfer it ?
    No idea ... would seem to be easy enough to do. (But then I don't code !)

  15. Lorelle
    Member
    Posted 9 years ago #

    Just a little bit more information that might help someone, it helps if you put the code between <code> tags.

  16. jrickards
    Member
    Posted 9 years ago #

    I have a related question to this one but somewhat opposite. I would like to enable the use of the <q> tag in the comments but I don't know where to go to "enable" this option. Any help would be appreciated.

  17. Lorelle
    Member
    Posted 9 years ago #

    What is a <q> tag? That is not valid XHTML or HTML, so you are going to have to be more specific.

    You can't use something that doesn't exist. Do you mean a <blockquote> like a "quote" tag?

  18. Kafkaesqui

    Posted 9 years ago #

    "You can't use something that doesn't exist."

    I'd like to get that tattooed on my chest...anyway, plugin solution!

    http://www.coffee2code.com/archives/2005/03/29/plugin-preserve-code-formatting/

  19. Michael Bishop

    Posted 9 years ago #

    Brilliant find. Now all I need to do is learn enough to feel confident to actually post about code.

  20. jrickards
    Member
    Posted 9 years ago #

    Regarding this comment above, the <q> tag is an inline quote tag whereas the <blockquote> is for longer quotes. See the details of the <q> tag at Index Dot HTML (amongst other good HTML resource Web sites).

  21. jrickards
    Member
    Posted 9 years ago #


  22. piero06
    Member
    Posted 9 years ago #

    After this long topic, what sholud i do to disable the HTML code ?

  23. Kafkaesqui

    Posted 9 years ago #

    A little busy for a simple topic, eh piero06? Here's a summary of the solutions posted:

    lbessant's suggestion:
    type < as &lt; and > as &gt;

    Podz SimpleCode *converter*:
    http://www.tamba2.org.uk/files/simplecode.php

    C2C Preserve Code Formatting plugin:
    http://www.coffee2code.com/archives/2005/03/29/plugin-preserve-code-formatting/

  24. Lorelle
    Member
    Posted 9 years ago #

  25. MorphineTearsCut
    Member
    Posted 8 years ago #

    Strange how this doesn't work for me. Like I am using a banner, and even when I use the suggested site, it still shows up as the banner. Help would be appreciated! Thanks!

  26. SOT1979
    Member
    Posted 7 years ago #

    I found a solution to this, type:

    <textarea name="textarea" rows="NUMBER OF ROWS YOU WANT" cols="NUMBER OF COLUMNS YOU WANT" wrap="virtual" class="txt">CODE YOU WANT INSIDE BOX</textarea>

    THIS ONE REALLY WORKS! :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags