WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Add HTML code into a apge without it acting as HTML. (5 posts)

  1. kieranfivestars
    Member
    Posted 1 year ago #

    basically I want to show html code as it is on the page, so that when I put it on the page it doesn't convert but stays the same.

    Hope this makes sense :)

    thanks

    Kieran

  2. Andrew Nevins
    Barrel Rider, Spam Zapper & Volunteer Moderator
    Posted 1 year ago #

    Can you put it into the visual editor?

  3. kieranfivestars
    Member
    Posted 1 year ago #

    yeah but then I try and add DIV tags to it in the html editor and it all messes up

  4. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Possibly you need a plugin if you want to actually show code:

    http://wordpress.org/extend/plugins/wp-code-highlight/

  5. kieranfivestars
    Member
    Posted 1 year ago #

    Thank you to the two people who actually bothered to reply, but I 'eventually' found it out for myself.

    to display html as html without it activating install this plugin:
    http://coffee2code.com/wp-plugins/preserve-code-formatting/

    download, then install via wordpress in the plugin section, then all you do is add [code] YOUR HTML [/code] to the page (but with <> instead of [] ), apparently this is buggy when switching to visual editor so just turn that off, ( i don't use it anyway)

    hope this helps other people who were in my situation :)

Topic Closed

This topic has been closed to new replies.

About this Topic